mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
3b7d0ed08e
This reduces the likelihood that I have made any exploitable errors in the encoding/decoding. This commit also imports the trunnel runtime source into Tor.
15 lines
282 B
Plaintext
15 lines
282 B
Plaintext
|
|
const PWBOX0_CONST0 = 0x544f5242; // TORB
|
|
const PWBOX0_CONST1 = 0x4f583030; // OX00
|
|
|
|
struct pwbox_encoded {
|
|
u32 fixedbytes0 IN [PWBOX0_CONST0];
|
|
u32 fixedbytes1 IN [PWBOX0_CONST1];
|
|
u8 header_len;
|
|
u8 skey_header[header_len];
|
|
u8 iv[16];
|
|
u8 data[..-32];
|
|
u8 hmac[32];
|
|
};
|
|
|