The AEGIS family of authenticated encryption algorithms jedisct1.github.io/draft-…
πŸ‘︎ 34
πŸ’¬︎
πŸ‘€︎ u/atoponce
πŸ“…︎ Oct 26 2021
🚨︎ report
The Strange State of Authenticated Boot and Disk Encryption on Generic Linux Distributions 0pointer.net/blog/authent…
πŸ‘︎ 103
πŸ’¬︎
πŸ‘€︎ u/ouyawei
πŸ“…︎ Sep 23 2021
🚨︎ report
Does Bitcoin use authenticated encryption?

Authenticated encryption is when you sign a message with your private key forming a digital signature, then add that and the message together and encrypt it using the person your sending to’s public key so only they can access it.

Does Bitcoin use this? Or only send off the transaction with the digital signature?

πŸ‘︎ 8
πŸ’¬︎
πŸ‘€︎ u/lilxskeet
πŸ“…︎ Oct 26 2021
🚨︎ report
Authenticated encryption with aes-ccm

Hi, I'm looking at a proposed fix for the lorawan IOT protocol.

This fix used authenticated encryption with aees-ccm-128 for both creating mac tags and encrypting.

The entire handshake protocol looks like this (lower part is cropped out since it is not that important):

https://preview.redd.it/hqp74fz40gy71.png?width=1049&format=png&auto=webp&s=eedd9685ee76bad7d91b63e9872c9d00956b60cd

But well, the mac tag for message 3 is for example made like:

mac = AES-CCM-128(k3,IV3, p1,A)

Where k3 is a key, IV3 is a an init vector, and p1 is a empty string, and A is called "associated data" and is some data connected to the current message

Then encryption is made like:

C = AES-CCM-128(k3,IV, p2, A2)

So, here it basically does the same thing, except that p2 is not an empty string, and now contains the mac.

Firstly, I understand that aes-ccm gives us authenticated encrpytion. But I was thinking that since it is authenticated, why do we then need to run it twice? once for mac tag and then once for encryption?

And then I was wondering what the two last argument are made for? both the "p" and "A" fields are things that are passed to the encryption, but I don't understand why they are given in two pairs? arent they just both things to be encrypted?

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/GarseBo
πŸ“…︎ Nov 08 2021
🚨︎ report
Authenticated Boot and Disk Encryption on Linux 0pointer.net/blog/authent…
πŸ‘︎ 21
πŸ’¬︎
πŸ‘€︎ u/aioeu
πŸ“…︎ Sep 23 2021
🚨︎ report
What are the practical advantages of a 12 byte nonce over an 8 byte nonce for authenticated encryption?

This all started with RFC 8439 (previously RFC 7539), that describes an AEAD construction using Chacha20 and Poly1305. My problem with this RFC is, they modified Daniel Bernstein's original design a little bit: the 64-bit nonce and 64-bit counter have been replaced by a 96-bit nonce and 32-bit counter.

This modification bothers me. At a first glance, it has nothing but drawbacks: 96 bits nonces may be bigger, but they're still not big enough to be selected at random. On the other hand, reducing the counter to 32-bits puts practically attainable limits to message lengths (256 GiB).

The RFC itself tells us they did it to be "more consistent" with RFC 5116, which recommends (but does not mandate) 96-bit nonces. It also gives some insight about how nonces might be designed. Here's what they recommend:

  • Implementations should support 96-bit nonces.
  • Nonces should be divided in a fixed part, and a counter part.
  • The fixed part identifies the device who performs encryption, and must remain unchanged.
  • The counter part should be monotonically increasing (like a counter).
  • The counter part should be 32-bit wide.

We can see how this enables group discussion among several devices that trust each other: mutable state stays local to each device, and we guaranteed nonce will not be reused.

There's also advice about how to handle partially implicit nonces (that aren't entirely transmitted over the network, but partially inferred from context):

  • The fixed part is divided into a fixed common sub-part and a fixed distinct sub-part.
  • The common sub-part is identical for all devices, and may be implicit (not sent over the network).
  • The distinct sub-part must be different for all devices, and must be explicit.
  • The counter must be explicit.

They did all this to follow what was reputed to be best practice at the time (2008, so DJB's Salsa and Chacha were brand new). We could see then why we'd want 96-bit nonces. Thing is, I'm not sure I agree with RFC 5116:

  • Limiting the counter part of the nonce to 32-bits puts a practical limit on the number of message we can send. 4 billion is an easy to exceed number.
  • Reserving 64-bit for the fixed part seems way overkill. 8 bits (up to 256 devices) potentially covers most use cases. Even if it doesn't, 16 bits ought to be enough (beyond 65K participant, the secret key is not so secret any more).

It see

... keep reading on reddit ➑

πŸ‘︎ 46
πŸ’¬︎
πŸ‘€︎ u/loup-vaillant
πŸ“…︎ Jun 29 2021
🚨︎ report
r/crypto - The AEGIS family of authenticated encryption algorithms jedisct1.github.io/draft-…
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/svanapps
πŸ“…︎ Oct 26 2021
🚨︎ report
Authenticated encryption wording help

What is authenticated encryption? I understand what confidentiality gives, but it talks about something called the authenticity of data.... what exactly does that mean? Is it integrity? or some form of authentication? I have looked around and seem to be getting mixed message regarding the meaning.

πŸ‘︎ 2
πŸ’¬︎
πŸ“…︎ Jul 15 2021
🚨︎ report
PeaZip: Free Zip / Unzip software and Rar file extractor. Cross-platform file and archive manager. Features volume spanning, compression, authenticated encryption. github.com/peazip/PeaZip
πŸ‘︎ 11
πŸ’¬︎
πŸ‘€︎ u/TsukiZombina
πŸ“…︎ Mar 22 2021
🚨︎ report
Why isn't a an encrypted hash enough for authenticated encryption?

in this wikipedia article there are various options, but not a simple E(M, H(M)) (where E is symmetric encryption, H is a cryptographic hash function and , is concatenation) for providing both encryption and authentication. Could you tell me why is that not enough? What are the possible attacks against it?

πŸ‘︎ 22
πŸ’¬︎
πŸ‘€︎ u/mistniim
πŸ“…︎ Jun 29 2020
🚨︎ report
AES-based Synthetic IDs (AES-SID): authenticated deterministic encryption for 64-bit integers based on AES-SIV (with applications to "Zoom Bombing")
  • GitHub: https://github.com/iqlusioninc/aes-sid
  • Rust implementation: https://crates.io/crates/aes-sid
  • /r/rust thread: https://www.reddit.com/r/rust/comments/fyndol/ann_aessid_v010_aesbased_synthetic_ids/

Background

Many databases use auto-incrementing primary keys to identify records. This is extremely convenient for many reasons but has some security drawbacks:

  • Leaks information (e.g. record count, lexicographic ordering of records)
  • URLs containing such identifiers are guessable

The latter has been a longstanding source of problems, such as leaking the e-mail addresses of all iPad users to the recent "Zoom Bombing" problem.

Many schemes exist to "mask"/"encrypt" integers. These range from awful (e.g. fixed XOR mask) to slightly less awful (AES in ECB mode). AES-SID provides a scheme using authenticated encryption, ensuring identifiers are non-malleable and therefore offer the attacker only chance advantage at guessing one correctly.

Construction

AES-SID is an experimental scheme I started working on as a "pandemic project" shortly before the "Zoom Bombing" phenomenon started gaining a lot of attention, which so happens to be potentially applicable to solving it. Zoom URLs are low-entropy and easily guessable/enumerable (among other issues), problems which can be addressed by converting them into higher entropy uniformly random IDs. By using a deterministic ID encryption scheme for this purpose, the encrypted IDs can be serialized as UUIDs in a way that's straightforward to retrofit onto systems based on integer primary keys.

AES-SID is a simplification of the original AES-SIV "key wrapping" scheme designed by Phil Rogaway and described in the paper and described in the paper The SIV Mode of Operation for Deterministic Authenticated-Encryption (Key Wrap) and Misuse-Resistant Nonce-Based Authenticated-Encryption.

Here is a pseudocode description of the scheme (see the project repo for a full comparison of AES-SIV vs AES-SID):

enc_key = KDF(key, 0, Kenclen)
prf_key = KDF(key, Kenclen, Ktotal)
siv = PRF(prf_key, plaintext)[0..8bytes]
ciphertext = siv || AES-CTR(enc_key, siv, plaintext)

Where the terms (not already described above) are as fol

... keep reading on reddit ➑

πŸ‘︎ 70
πŸ’¬︎
πŸ‘€︎ u/bascule
πŸ“…︎ Apr 10 2020
🚨︎ report
Primer on Cryptography for the Technical and Nontechnical (Part II Authenticated Encryption) medium.com/@emilywilliams…
πŸ‘︎ 19
πŸ’¬︎
πŸ‘€︎ u/emaG3M
πŸ“…︎ Aug 24 2020
🚨︎ report
Daence: Salsa20 and ChaCha in Deterministic Authenticated Encryption with no noNCEnse eprint.iacr.org/2020/067
πŸ‘︎ 9
πŸ’¬︎
πŸ‘€︎ u/knotdjb
πŸ“…︎ May 03 2020
🚨︎ report
Primer on Cryptography for the Technical and Nontechnical (Part II Authenticated Encryption) medium.com/@emilywilliams…
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/emaG3M
πŸ“…︎ Aug 24 2020
🚨︎ report
[ANN] aes-gcm-siv v0.1.0: high-performance misuse resistant authenticated encryption - experimental pure Rust implementation crates.io/crates/aes-gcm-…
πŸ‘︎ 22
πŸ’¬︎
πŸ‘€︎ u/bascule
πŸ“…︎ Sep 28 2019
🚨︎ report
Authenticated encryption with associated data

I'm working on a lightweight protocol that needs authentication and encryption of packets. The problem is essentially authenticated encryption with associated data, where the header information is the associated data that needs to be authenticated but not encrypted. I had an idea for how to accomplish this but I can't seem to find any information on anyone doing it the same way - which is concerning. I can still change tack to the classic encrypt-then-MAC approach, but I'm trying to understand what the drawbacks are of my approach.

The packet would be laid out in 2 sections: a header that is not encrypted that contains a nonce and a CRC of the plaintext, and the payload which is encrypted. Both sections must be authenticated.

Overview of structure

My plan is to use BLAKE2xs as the cryptographic hash, which can be used as a KDF. The basic premise of the idea is that the shared secret AND the associated data are used as the input to the BLAKE2xs KDF, and an output key is generated that is the same length as the payload. That key is XORed with the payload to keep it confidential.

During reception the first step would be to run the KDF with the associated data & secret, then XOR the resulting key with the payload. The CRC of the plaintext is then verified.

The advantage I see with this approach is that I'm not running multiple cryptographic operations on my microcontroller for each packet. The potential disadvantages I see are that the KDF+XOR encryption perhaps isn't strong, and I think it runs afoul of the "cyptographic doom principle" since the authentication step happens after decryption.

I couldn't find any information on similar schemes online, so I haven't seen any analysis of it. My assumption is that it is not used because it is severely flawed. Are there disadvantages I'm not seeing, or are the disadvantages I listed more damning than I realize? Thanks for taking a look.

πŸ‘︎ 5
πŸ’¬︎
πŸ“…︎ Sep 05 2019
🚨︎ report
Curses based Spreadsheet supporting CSV files with Authenticated Encryption in Python /user/HanishKVC/comments/…
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/HanishKVC
πŸ“…︎ Sep 15 2020
🚨︎ report
Using authenticated encryption...

Using something like ChaCha20-Poly1305,

I understand you encrypt with a nonce+key and then get ciphertext+Mac...

Does this mean your partner needs the same MAC secret on their side to verify? if so using modern libs, how is it recommended to transmit the MAC?

Thanks

_BP

πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/_Basilpop
πŸ“…︎ Jan 10 2020
🚨︎ report
[ANN] chacha20(poly1305) v0.3.1: pure Rust authenticated encryption - now with AVX2 acceleration

I've just released version v0.3.1 of the chacha20 and chacha20poly1305 crates by the RustCrypto Project (the new without-a-hyphen GitHub Org , not the old with-a-hyphen unmaintained crate).

This is the biggest release in awhile and includes the following noteworthy announcements:

chacha20 v0.3.1 - shoot-yourself-in-the-foot unauthenticated stream cipher used to implement chacha20poly1305 (and now also provides CryptoRng)

  • All dependencies (stream-cipher, rand_core, and zeroize) are now optional, and the rng feature now depends exclusively on the rand_core crate. With chacha20 = { version = "0.3", default-features = false, features = ["rng"] }, the only dependency is the rand_core crate.
  • The buffering logic has been dramatically improved. The RNG no longer performs any buffering whatsoever.
  • ChaCha8 / ChaCha8Rng / ChaCha8RngCore and ChaCha12 / ChaCha12Rng / ChaCha12RngCore are now available.
  • It now supports an AVX2 backend (implemented in terms of core::arch intrinsics) which brings its performance to ~1.4 cycles/byte when using that backend. The implementation is based on Goll, M., and Gueron,S.: Vectorization of ChaCha Stream Cipher (2013). Below is the performance improvement over the previous SSE2 backend according to criterion: Benchmark Results

If you'd like to use it for a CryptoRng, particularly with the high-performance ChaCha8Rng, it now has first-class support under the rng feature, and ideally could be the ChaCha RNG provider for the rand crate.

chacha20poly1305 v0.3.1 - high-level AEAD mode intended to be directly used in applications

πŸ‘︎ 23
πŸ’¬︎
πŸ‘€︎ u/bascule
πŸ“…︎ Jan 16 2020
🚨︎ report
.NET Core 3.0 implementation of AES-GCM-SIV nonce misuse-resistant authenticated encryption github.com/Metalnem/aes-g…
πŸ‘︎ 16
πŸ’¬︎
πŸ‘€︎ u/Metalnem
πŸ“…︎ Nov 06 2018
🚨︎ report
AES-GCM-SIV: Nonce Misuse-Resistant Authenticated Encryption rfc-editor.org/rfc/rfc845…
πŸ‘︎ 30
πŸ’¬︎
πŸ‘€︎ u/johnmountain
πŸ“…︎ Apr 18 2019
🚨︎ report
Universal Forgery with Birthday Paradox: Application to Blockcipher-based Message Authentication Codes and Authenticated Encryptions eprint.iacr.org/2017/653.…
πŸ‘︎ 14
πŸ’¬︎
πŸ‘€︎ u/api
πŸ“…︎ Sep 18 2019
🚨︎ report
securefs: Filesystem in userspace (FUSE) with transparent authenticated encryption github.com/netheril96/sec…
πŸ‘︎ 29
πŸ’¬︎
πŸ‘€︎ u/ThisIs_MyName
πŸ“…︎ Mar 24 2018
🚨︎ report
Libsodium authenticated encryption is inexplicably fast

While benchmarking Monocypher, I've noticed strange (yet consistent) timings from libsodium (on my core i5 skylake laptop):

Chacha20         :  1925 megabytes  per second
Poly1305         :  1191 megabytes  per second
Auth'd encryption:  1016 megabytes  per second

The benchmark uses crypto_stream_chacha20_xor(), crypto_onetimeauth(), and crypto_aead_xchacha20poly1305_ietf_encrypt_detached() respectively.

I've looked ath their AEAD function, and it looks like a straightforward implementation that just uses their chacha20 and poly1305 algorithms. But if they did that, I would expect authenticated encryption to have a throughput of only 736 megabytes per second (1/ (1/1925 + 1/1191)). Monocypher, on the same benchmark, follow this rule (chacha20 is much slower, but the timings make sense).

So there's an unexplained 300 megabytes per second here, and I have no idea where it might come from. Surely libsodium doesn't use faster core algorithms for authenticated encryption? I though it would combine them in clever ways, but it doesn't look like it does. Any idea what might be going on here?

(For reference, here's the benchmark's source code, in case someone finds a flaw.)

πŸ‘︎ 20
πŸ’¬︎
πŸ‘€︎ u/loup-vaillant
πŸ“…︎ Feb 02 2018
🚨︎ report
Patent-Free Authenticated-Encryption As Fast As OCB (2007) [pdf] krovetz.net/csus/papers/v…
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/beefhash
πŸ“…︎ Dec 31 2019
🚨︎ report
AES-GCM-SIV: Nonce Misuse-Resistant Authenticated Encryption tools.ietf.org/html/rfc84…
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/qznc_bot
πŸ“…︎ Apr 18 2019
🚨︎ report
Challenges in Authenticated Encryption [PDF] chae.cr.yp.to/chae-201703…
πŸ‘︎ 19
πŸ’¬︎
πŸ‘€︎ u/dchestnykh
πŸ“…︎ Mar 07 2017
🚨︎ report
Why isn't 3DES-CBC for master password encryption authenticated, and can it be versioned towards AES-GCM? dxr.mozilla.org/mozilla-c…
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/atoponce
πŸ“…︎ Mar 27 2019
🚨︎ report
AEZ: authenticated encryption by enciphering web.cs.ucdavis.edu/~rogaw…
πŸ‘︎ 14
πŸ’¬︎
πŸ‘€︎ u/api
πŸ“…︎ Sep 01 2015
🚨︎ report
.NET Core 3.0 implementation of AES-GCM-SIV nonce misuse-resistant authenticated encryption github.com/Metalnem/aes-g…
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/Metalnem
πŸ“…︎ Nov 06 2018
🚨︎ report
I am working on a project on authenticated encryption. Are there any C++ crypto libraries I can use?

The ciphers I am currently looking into are: Simon, Aes-copa, OMAC

πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/BreadSpread
πŸ“…︎ Feb 10 2016
🚨︎ report
Beyond signed cookies/JWTs: Authenticated encryption. Crypto advice?

Hi all, I've used lots of signed cookies (e.g HMAC) and JSON Web Tokens (JWTs).

They're great for storing sessions without a database! ...as long as you don't have sensitive information inside, because it's all visible to the client.

So, how about not just signing, but also encrypting?

My research is pointing me to aes-256-gcm as good algorithm that both encrypts and signs a plaintext. The aes-256 part is a standard algorithm, and the gcm part means that it also allows to verify the authenticity of the message (which apparently isn't a given with other algorithms).

Here's my understanding of how the process works on node.js, and I'm looking for feedback.

  • Start with a JSON payload, which contains the session contents.
  • Generate a random 12-byte initialization vector.
  • Encrypt the payload with aes-256-gcm (crypto.createCipheriv('aes-256-gcm', key, iv))
  • Get the "authentication tag" which serves as the authenticity signature (cipher.getAuthTag())

The result is 3 values, which can be then base64 encoded and concatenate together to form a signed, encrypted token:

  1. The initialization vector
  2. The auth tag
  3. The ciphertext

Decryption uses crypto.createDecipheriv('aes-256-gcm', key, iv) and decipher.setAuthTag(authTag) which succeeds if the authentication tag is verified, and throws an exception otherwise.

I'm looking for feedback on this process. Is this a proper use of GCM? Does this make cryptographic sense?

Inside the payload, JWT claims can be used (like an expiry time) and can be checked as a second step, after decryption.

Are there caveats I should look out for? Is this paying a high price in performance, as opposed to just HMAC signing? Does the tradeoff make sense?

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/ecmascript2038
πŸ“…︎ Mar 11 2016
🚨︎ report
Python3/Numpy Implementation of the Kravatte Authenticated Encryption Suite github.com/inmcm/kravatte
πŸ‘︎ 10
πŸ’¬︎
πŸ‘€︎ u/INMCM
πŸ“…︎ Mar 31 2018
🚨︎ report
[ANN] aes-sid v0.1.0: AES-based Synthetic IDs: authenticated deterministic encryption for 64-bit integers based on AES-SIV (with applications to "Zoom Bombing")

Announcing the initial release of aes-sid: an experimental scheme providing a non-malleable encoding of 64-bit integers as 128-bit ciphertexts (or UUIDs):

  • GitHub: https://github.com/iqlusioninc/aes-sid
  • crates.io: https://crates.io/crates/aes-sid
  • docs.rs: https://docs.rs/aes-sid/
  • /r/crypto discussion: https://www.reddit.com/r/crypto/comments/fyn8cs/aesbased_synthetic_ids_aessid_authenticated/?

Many databases use auto-incrementing primary keys to identify records. This is extremely convenient for many reasons but has some security drawbacks:

  • Leaks information (e.g. record count, lexicographic ordering of records)
  • URLs containing such identifiers are guessable

The latter has been a longstanding source of problems, such as leaking the e-mail addresses of all iPad users to the recent "Zoom Bombing" problem.

Many schemes exist to "mask"/"encrypt" integers. These range from awful (e.g. fixed XOR mask) to slightly less awful (AES in ECB mode). AES-SID provides a scheme using authenticated encryption, ensuring identifiers are non-malleable and therefore offer the attacker only chance advantage at guessing one correctly.

AES-SID provides a deterministic, non-malleable encryption of integers as uniformly random 128-bit strings, which can be conveniently serialized as UUIDs.

Note that this is an experimental scheme which is presently explicitly labeled as "DO NOT USE THIS CODE IN PRODUCTION!" until I'm able to solicit more feedback on it. With that said I believe this approach represents the state-of-the-art in solving this problem.

πŸ‘︎ 29
πŸ’¬︎
πŸ‘€︎ u/bascule
πŸ“…︎ Apr 10 2020
🚨︎ report

Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.