Hello,
I'm currently working on a Python implementation of the spectre algorithm. V3 is already working nicely, but I have problems implementing the identicon. My ported code is as follows:
`
def newIdenticon(self, userName, userSecret):
print(f"[spectre]: identicon: {userName}")
userSecretBytes = bytes(userSecret, "utf-8")
userNameBytes = bytes(userName, "utf-8")
seed = hmac.new(userSecretBytes, msg=userNameBytes, digestmod=hashlib.sha256).digest()
return {
"leftArm": spectreTypes.identicons["leftArm"][seed[0] % len(spectreTypes.identicons["leftArm"])],
"body": spectreTypes.identicons["body"][seed[0] % len(spectreTypes.identicons["body"])],
"rightArm": spectreTypes.identicons["rightArm"][seed[0] % len(spectreTypes.identicons["rightArm"])],
"accessory": spectreTypes.identicons["accessory"][seed[0] % len(spectreTypes.identicons["accessory"])]
}
# newIdenticon
`
It does return identicons, but they look different from those created by the desktop version of Masterpassword and there is no reference implementation in spectre web. Should the spectre code create the same identicons as Masterpassword desktop?