Skip to content

Commit

Permalink
Updated AES128-GCM example.
Browse files Browse the repository at this point in the history
  • Loading branch information
markkurossi committed Dec 19, 2023
1 parent 501f9de commit 92b8a89
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions apps/garbled/examples/aesgcm.mpcl
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,7 @@ func main(a, b byte) (string, int) {
0xb4, 0x22, 0xda, 0x80,
}
plain := []byte("Single block msgSingle block msg")
additional := []byte("unused")

cipher := []byte{
0x95, 0xc9, 0x12, 0xbe, 0x04, 0x22, 0x3b, 0x3f,
0xdc, 0x60, 0x1b, 0x6f, 0x33, 0x7c, 0xe9, 0x7d,
0xd9, 0xa6, 0x41, 0x75, 0x3c, 0x99, 0x7e, 0x3e,
0xcf, 0xdd, 0xc3, 0x92, 0xd2, 0x4b, 0x00, 0xd2,
0x76, 0x66, 0xc0, 0x99, 0xd7, 0x20, 0xc8, 0x3b,
0x9a, 0x3c, 0xf6, 0xc9, 0x07, 0x9f, 0xb3, 0x46,
}
additional := []byte("additional data to be authenticated")

c := gcm.EncryptAES128(key, nonce, plain, additional)
p, ok := gcm.DecryptAES128(key, nonce, c, additional)
Expand Down

0 comments on commit 92b8a89

Please sign in to comment.