mirror of
https://github.com/tlsnotary/circuits.git
synced 2026-01-09 14:58:03 -05:00
37 lines
1007 B
Plaintext
37 lines
1007 B
Plaintext
# AES-ECB-encrypt one block
|
|
# (AES-GCM first AES-ECB-encrypts a counter block and then xors the result with the plaintext
|
|
# to get the ciphertext)
|
|
|
|
# The value of fixed inputs is known in the offline phase
|
|
|
|
5 885
|
|
2 160 308
|
|
|
|
# notary inputs
|
|
# fixed
|
|
# 128: mask to unmask client write key
|
|
# 32 : mask to unmask client write IV
|
|
# client inputs
|
|
# 128: client write key masked by notary
|
|
# 32 : client write IV masked by notary
|
|
# fixed
|
|
# 128: output mask
|
|
# 10: nonce
|
|
# 10: counter (max block counter is 1023)
|
|
|
|
1 128
|
|
# all outputs go to the evaluator
|
|
# 128: encrypted counter block xor-masked by client
|
|
|
|
2 1 0 0 468 XOR # 0
|
|
|
|
# unmask client_write_key
|
|
256 128 [0|>128] [160|>128] [469|>128] xor128bits.casm
|
|
|
|
# unmask client_write_IV
|
|
64 32 [128|>32] [288|>32] [597|>32] xor32bits.casm
|
|
|
|
# encrypt client_write_IV + nonce (8 bytes) + counter (4 bytes)
|
|
256 128 [469|>128] [458|>10] [468*22] [448|>10] [468*54] [597|>32] [629|>128] aes-128-reverse.txt
|
|
|
|
256 128 [629|>128] [320|>128] [757|>128] xor128bits.casm |