aes-gcm-siv | NET Core 3.0 implementation | Cryptography library
kandi X-RAY | aes-gcm-siv Summary
kandi X-RAY | aes-gcm-siv Summary
.NET Core 3.0 implementation of AES-GCM-SIV nonce misuse-resistant authenticated encryption
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of aes-gcm-siv
aes-gcm-siv Key Features
aes-gcm-siv Examples and Code Snippets
Community Discussions
Trending Discussions on aes-gcm-siv
QUESTION
Using any password that isn't 32 bytes makes the program panic with:
...ANSWER
Answered 2021-Mar-21 at 09:23Part of your problem is that you're using a password directly as a key. You don't want to do that. AES requires a 128-bit, 192-bit, or 256-bit key, and ideally you want it to be indistinguishable from random, which a password typically is not.
If you have a low-entropy secret, you'll probably want to use something like Argon2id to take that passphrase and a random salt of sufficient length to derive a key. If you have a strong secret with lots of entropy, then you can use something like HKDF to generate a key. If you do either of those things, you can generate a key that's exactly 32 bytes long, and, if you want to, a random nonce for the encryption as well. Since you're using AES-GCM-SIV, you can also use a random nonce and just derive the key this way.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install aes-gcm-siv
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page