Skip to content
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

Added asymmetric encrypt and decrypt #36

Merged

Conversation

sbailey-arm
Copy link
Contributor

Signed-off-by: Samuel Bailey samuel.bailey@arm.com

@sbailey-arm
Copy link
Contributor Author

This PR won't pass CI until a new version of parsec-interface-rs has been released to creates.io. I will mark as ready for review once that has been done 😄.

Copy link
Member

@ionut-arm ionut-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I'll publish the new interface version shortly.

Comment on lines 555 to 558
let salt = match salt {
Some(salt) => Some(Zeroizing::new(salt.to_vec())),
None=> None,
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that I think of it, map should be cleaner here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, that's nice and neat. I realise now that I could have written this as:

        let salt = match salt {
            Some(salt) => Some(salt.to_vec().into()),
            None=> None,
        };

but I like map. It makes the other match in parsec much clearer!

@ionut-arm
Copy link
Member

This PR won't pass CI until a new version of parsec-interface-rs has been released to creates.io. I will mark as ready for review once that has been done 😄.

Version 0.18.0 has now been published

@sbailey-arm sbailey-arm force-pushed the add-asym-encrypt-decrypt branch from 50f70ed to c3ec023 Compare July 7, 2020 11:08
@sbailey-arm sbailey-arm marked this pull request as ready for review July 7, 2020 11:11
Copy link
Member

@ionut-arm ionut-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, actually, could you please add some tests? You can see the examples in src/core/testing

@sbailey-arm sbailey-arm force-pushed the add-asym-encrypt-decrypt branch from c3ec023 to 9ffd3f6 Compare July 7, 2020 12:03
Signed-off-by: Samuel Bailey <samuel.bailey@arm.com>
@sbailey-arm sbailey-arm force-pushed the add-asym-encrypt-decrypt branch from 9ffd3f6 to 2b6e1d2 Compare July 7, 2020 12:06
Comment on lines +552 to +553
plaintext: &[u8],
salt: Option<&[u8]>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice type choice for those vectors!

@hug-dev hug-dev merged commit 8eb083d into parallaxsecond:master Jul 7, 2020
@hug-dev
Copy link
Member

hug-dev commented Jul 7, 2020

Version 0.6.0 just published!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants