multiformats / multicodec

Compact self-describing codecs. Save space by using predefined multicodec tables.
MIT License
338 stars 202 forks source link

Adding multicodec for aes-gcm #314

Closed guillaumemichel closed 1 year ago

guillaumemichel commented 1 year ago

Adding aes-gcm-256 multicodec. Please edit if the category encryption doesn't fit here.

aes-gcm-256 is a payload format: the 12-byte Initialization Vector (IV) is concatenated with a payload encrypted using AES in Galois/Counter Mode, using a 256-bit key and the 12 byte IV.

This multicodec is required for the Double Hash DHT https://github.com/ipfs/specs/pull/373

guillaumemichel commented 1 year ago

Moved aes-gcm-256 to 0x2000

code               varint
8192 (0x2000)   => 10000000 01000000 (0x8040)