-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch pallet-bioauth authorities to WeakBoundedVec
and enable generate_storage_info
#208
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can't we just make the AuthTicketNonce
type the WeakBoundedVec
instead of Vec
, and leave it in the pallet?
In case we use
The task is to define a type for AuthTickenNonce that will have a limited size and be serialized and deserialized. That's why for now I exposed it to the runtime level where it can be implemented. According the fact that [u8; 32] is serialized and deserialized we can use it at pallet level easly. |
I think this is ultimately a good time to take into account the refactoring of our nonces system. |
In terms of nonces, I like to use it as a cryptographic object to make it more unique. A salted hash os one of them as well. For example for now we can use SHA256 to generate nonces from salt. 256 bits hash is 32 bytes. Therefore, [u8; 32] can be used for now. What do you think? |
I'd like to discuss the pros and cons of going with obscured vs plain nonce; regarding the hash function itself - we probably should discuss it later, but I think we need to go with something like keccak, rather than sha2... |
6e7bc10
to
740bf05
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments
I think this is ready to merge, let's do it? |
Just doing it. |
Closes #187