X-Git-Url: http://git.euphorik.ch/?p=crypto_lab1.git;a=blobdiff_plain;f=lab1_rust%2Fsrc%2Fpacket.rs;fp=lab1_rust%2Fsrc%2Fpacket.rs;h=7e9c38ccb362b4a51153aebb2e55bed38e7c17a5;hp=4016ccb845ce9cea5513eae64c8ffe8d43de113a;hb=9cdc634f2ce4d0e88f4d3af1d6f555a5449da189;hpb=caf6b34147c52f94cb08e66c9d1af44089a3f493 diff --git a/lab1_rust/src/packet.rs b/lab1_rust/src/packet.rs index 4016ccb..7e9c38c 100644 --- a/lab1_rust/src/packet.rs +++ b/lab1_rust/src/packet.rs @@ -77,12 +77,12 @@ pub enum PacketType { /// 0x0A: Decrypt error /// 0x0B: Authentication error /// TTTTTTTT: Timestamp (64 bits) -/// D...D: Encrypted data (AES-256 CBC mode) of: -/// |I|C...C|P...P| for command and answer packet: -/// I: Command ID -/// C: Command payload (from 7 to 39 bytes) -/// P: Padding from 1 to 16, |I|C...C|P...P| size must be a multiple of 16 -/// |0000000000000000| for error packet (16 bytes length) +/// D...D: Encrypted data (AES-256 CBC mode) of: +/// |I|C...C|P...P| for command and answer packet: +/// I: Command ID +/// C: Command payload (from 7 to 39 bytes) +/// P: Padding from 1 to 16, |I|C...C|P...P| size must be a multiple of 16 +/// |0000000000000000| for error packet (16 bytes length) /// MMMMMMMMMM: first 10 bytes (most significant) of the HMAC-SHA256 of: /// for command and answer packet: /// |I|C...C| for weak variant