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

sm2: Fix heap allocation #1099

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

MaxKingPor
Copy link

Fix sm2 heap allocation

@tarcieri
Copy link
Member

@MaxKingPor sorry this PR went by the wayside, can you rebase it and we can get it merged?

@MaxKingPor MaxKingPor reopened this Mar 15, 2025
@MaxKingPor MaxKingPor force-pushed the master branch 2 times, most recently from 6bc5abd to 8a07d9e Compare March 17, 2025 12:07
@MaxKingPor
Copy link
Author

@tarcieri Done. Use the current commit or the previous commit.

use super::{Cipher, Mode, encrypting::EncryptingKey, kdf, vec};
/// Represents a decryption key used for decrypting messages using elliptic curve cryptography.
#[derive(Clone)]
pub struct DecryptingKey {
Copy link
Member

Choose a reason for hiding this comment

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

I'd prefer these names be retained, as they're more consistent with our other crates which identify key types by function

use super::{Cipher, kdf};

/// Decrypt messages using elliptic curve cryptography.
pub trait EcDecrypt<C>
Copy link
Member

Choose a reason for hiding this comment

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

Not sure why a trait is necessary where when it has only one impl. What's the intended use case?

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.

2 participants