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

Aes keysize update #1054

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/Octopus.Tentacle/Security/AesEncryption.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Aes GetCryptoProvider(byte[]? iv = null)
var provider = Aes.Create();
provider.Mode = CipherMode.CBC;
provider.Padding = PaddingMode.PKCS7;
provider.KeySize = 128;
provider.KeySize = 256;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was expecting you'd need to modify the key generation to use a 32 byte key also.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setting this key size doesn't do anything by itself, when you set the key, it'll then set the keysize 😂

Maybe steal the Calamari version: https://github.com/OctopusDeploy/Calamari/pull/1405/files#diff-67547aea4be6e349d7da9a9a3f90d83a795171716b038c406aff1ff8d4c8d18b

provider.BlockSize = 128;
provider.Key = key;

Expand Down