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

Update AES Encryption to 256bits for script bootstrappers #1405

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

flin-8
Copy link
Contributor

@flin-8 flin-8 commented Dec 12, 2024

[sc-98850]

@flin-8 flin-8 self-assigned this Dec 12, 2024
@flin-8 flin-8 changed the title Update AES Encryption to 256bits Update AES Encryption to 256bits for script bootstrappers Dec 13, 2024
@@ -17,9 +32,10 @@ public class AesEncryption

readonly byte[] key;

public AesEncryption(string password)
public AesEncryption(string password, int keySizeBits)
Copy link
Contributor Author

@flin-8 flin-8 Dec 13, 2024

Choose a reason for hiding this comment

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

Making the key size configurable allows us to upgrade the 3 components (scripts, step package, variables file) separately.


readonly int keySizeBits;

const int BlockSizeBits = 128;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Block size can remain at 128

@@ -8,6 +8,21 @@ namespace Calamari.Common.Plumbing.Extensions
{
public class AesEncryption
{
//Key size used to encrypt variables for scripts (bash/powershell etc.)
//The variables are decrypted in the respective bootstrapper scripts
public static readonly int ScriptBootstrapKeySize = 256;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This PR only increases the key size for scripts

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.

1 participant