Documentation ¶
Overview ¶
Package grain implements the Grain128-AEAD cipher.
Performance ¶
For 1 KiB plaintext, this implementation runs at about 40-50 cycles per byte (tested on a 2020 MacBook Air M1 @ 3.2Ghz and a 2019 Macbook Pro i7 @ 2.6Ghz). This is roughly equivalent to the optimized C implementation [m1,x86].
This implementation runs at about ¶
References:
[grain]: https://grain-128aead.github.io/ [m1]: https://gist.github.com/ericlagergren/645eb97a05efd37152d6f1cfa9cf9d4a [x86]: https://gist.github.com/elagergren-spideroak/4bd31a59925de3b19227d4ae80b55cf0
Index ¶
Constants ¶
View Source
const ( // BlockSize is the size in bytes of an Grain128-AEAD block. BlockSize = 16 // KeySize is the size in bytes of an Grain128-AEAD key. KeySize = 16 // NonceSize is the size in bytes of an Grain128-AEAD nonce. NonceSize = 12 // TagSize is the size in bytes of an Grain128-AEAD // authenticator. TagSize = 8 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.