Repository navigation
feat: add RC4 implementation - #285
Conversation
|
It's hard to implement |
|
@magic-akari you can make the See how |
|
Lines 128 to 146 in 0b9ebe8 HI, @tarcieri , User have to write
While as a user, I prefer the following codes. Lines 119 to 125 in 6321600 |
|
@magic-akari the root problem there is really However, I think it would still make sense to impl Users should define a type alias with the expected key size, or the crate can define some aliases for common key sizes: pub type Rc4_128 = Rc4<U16>;To me this is preferable to trying to infer the key size from the parameter, since unless it's constrained someone might accidentally pass the wrong/unexpected key size for a given application without noticing. |
|
Can you please update this crate to |
|
HI, @newpavlov |
|
Well, strictly speaking RC4 has block size of one byte. Implementation of fn gen_ks_block(&mut self, block: &mut Block<Self>) {
// `block` has type of `GenericArray<u8, U1>`
block[0] = self.state.prga();
}Alternatively you could implement the |
|
@newpavlov can you review it? |
|
I can do a first pass this weekend |
|
Looks good, thank you! I'm going to do some minor followup cleanups after merging. |
|
See #299 for fixups |
Adds the recently merged `rc4` crate to the table (#285) Also adds a "Security" column similar to the one in this table: https://github.com/RustCrypto/hashes/blob/master/README.md#supported-algorithms - ChaCha20 and Salsa20 are categorized as secure - HC-256 and Rabbit have theoretical breakages - RC4 is broken and vulnerable to plaintext recovery Both HC-256 and Rabbit have known distinguishing attacks: - https://link.springer.com/chapter/10.1007/978-3-642-04846-3_4 - https://eprint.iacr.org/2013/780.pdf
No description provided.