-
Notifications
You must be signed in to change notification settings - Fork 0
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
Draft: initial cryptography implementation #1
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.
Would you consider moving all parameters into separate trait Ciphersuite
? Something like:
pub trait Ciphersuite {
type Curve: generic_ec::Curve;
type Mac: digest::Mac + cipher::KeyInit;
type Enc: cipher::KeyIvInit + cipher::StreamCipher;
type HmacDigest: digest::Digest;
type SecretKey;
fn secret_key_to_scalar(sk: &Self::SecretKey) -> NonZero<SecretScalar<Self::Curve>>;
}
then everything can be parametrized just by this one trait.
@maurges btw I can't actually review the PR / mark threads as resolved. Can you add research group as admins? |
@maurges what do you think about ciphersuite trait? |
I think it's a neat idea, although my vision for this library was to be monomorphic: the primary interface should be |
Doesn't work for now
Please check that it's sane and there are no silly errors