Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crypto aead #31

Merged
merged 5 commits into from
Oct 22, 2017
Merged

Crypto aead #31

merged 5 commits into from
Oct 22, 2017

Conversation

silkeh
Copy link
Contributor

@silkeh silkeh commented Jul 16, 2017

This pull request adds a new wrapping of crypto_aead in a new tree, as discussed in #25.

crypto_aead is split into five packages:

  • crypto/aead provides an AEAD interface, which is an extended version of golang's crypo/cipher.AEAD. This interface is implemented for AES256CGM.
  • crypto/aead/aes256gcm implements the rest of crypto_aead_aes256gcm.
  • crypto/aead/chacha20poly1305 implements crypto_aead_chacha20poly1305.
  • crypto/aead/chacha20poly1305ietf implements crypto_aead_chacha20poly1305_ietf.
  • crypto/aead/xchacha20poly1305ietf implements crypto_aead_xchacha20poly1305_ietf.

All code includes tests with 100% coverage and is linted with golint.

The pull request includes some extension of the support functions, for which I could create a separate pull request if so desired.

@redragonx
Copy link
Contributor

Thank you, I'm currently looking into these PRs!

silkeh added 4 commits August 24, 2017 16:18
CheckSizeInRange now has a []byte argument
CheckIntInRange has an Int argument
Includes a significant refactor:

 - Return error instead of integer
 - Replace getter functions with constants
 - Move prepared encryption to cipher.AEAD compatible structure
 - Add tests
The key and nonce size are now given as an array pointer to make more clear
that the key and nonce size are fixed.
@redragonx redragonx merged commit 272960b into GoKillers:master Oct 22, 2017
@redragonx redragonx mentioned this pull request Oct 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants