-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Last minute changes to the ChaCha20Poly1305 API
Unfortunately I already shipped 4.0.0. Technically this is a semantic versioning violation. However, the API is not yet documented and there have only been 40 downloads of 4.0.0, so I think it's still safe to ship some last-minute changes nobody will complain about (I hope!) - Add "Legacy" to the old ChaCha20Poly1305 API to impart it shouldn't be used except for compatibility reasons - Capitalize both 'C's in ChaCha - Rename the base class of AEAD ciphers to `RbNaCl::AEAD::Base`
- Loading branch information
Showing
8 changed files
with
32 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
# encoding: binary | ||
# frozen_string_literal: true | ||
|
||
RSpec.describe RbNaCl::AEAD::Chacha20Poly1305IETF do | ||
RSpec.describe RbNaCl::AEAD::ChaCha20Poly1305IETF do | ||
if RbNaCl::Sodium::Version.supported_version?("1.0.9") | ||
include_examples "aead" do | ||
let(:key) {vector :aead_chacha20poly1305_ietf_key} | ||
let(:message) {vector :aead_chacha20poly1305_ietf_message} | ||
let(:nonce) {vector :aead_chacha20poly1305_ietf_nonce} | ||
let(:ad) {vector :aead_chacha20poly1305_ietf_ad} | ||
let(:ciphertext) {vector :aead_chacha20poly1305_ietf_ciphertext} | ||
|
||
let(:aead) { RbNaCl::AEAD::Chacha20Poly1305IETF.new(key) } | ||
let(:key) { vector :aead_chacha20poly1305_ietf_key } | ||
let(:message) { vector :aead_chacha20poly1305_ietf_message } | ||
let(:nonce) { vector :aead_chacha20poly1305_ietf_nonce } | ||
let(:ad) { vector :aead_chacha20poly1305_ietf_ad } | ||
let(:ciphertext) { vector :aead_chacha20poly1305_ietf_ciphertext } | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# encoding: binary | ||
# frozen_string_literal: true | ||
|
||
RSpec.describe RbNaCl::AEAD::ChaCha20Poly1305Legacy do | ||
include_examples "aead" do | ||
let(:key) { vector :aead_chacha20poly1305_orig_key } | ||
let(:message) { vector :aead_chacha20poly1305_orig_message } | ||
let(:nonce) { vector :aead_chacha20poly1305_orig_nonce } | ||
let(:ad) { vector :aead_chacha20poly1305_orig_ad } | ||
let(:ciphertext) { vector :aead_chacha20poly1305_orig_ciphertext } | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters