-
Notifications
You must be signed in to change notification settings - Fork 134
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
CryptoPAN #861
base: master
Are you sure you want to change the base?
CryptoPAN #861
Conversation
use std::net::{Ipv4Addr, Ipv6Addr}; | ||
|
||
/// The CryptoPAN anonymizer | ||
pub struct CryptoPAn { |
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.
Per RFC 430 I think this should just be CryptoPan
:
pub struct CryptoPAn { | |
pub struct CryptoPan { |
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.
As suggested in the previous PR, I think it's worth to make CryptoPan
generic over the cipher
traits. The original paper (unsurprisingly) defines the algorithm in a generic fashion and even mentions AES ciphers with other key lengths. In addition to supporting other ciphers, such change would also allow to use reference to cipher (i.e. &Aes128
) instead of owned instance.
I would also remove dependency on bitvec
, but we can do it in a separate PR.
readme = "README.md" | ||
|
||
[dependencies] | ||
aes="0.8.1" |
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.
aes="0.8.1" | |
aes = "0.8.1" |
|
||
|
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.
Move from RustCrypto/utils 831
CryptoPAN is a prefix-preserving IP address anonymization algorithm.