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

Add enclave encrypt package and use go 1.21 #42

Merged
merged 8 commits into from
Mar 11, 2024
Merged

Conversation

oliviathet
Copy link
Contributor

@oliviathet oliviathet commented Mar 6, 2024

@oliviathet oliviathet changed the base branch from main to olivia/update-swagger-v2024.2.2 March 6, 2024 17:43
@oliviathet oliviathet force-pushed the olivia/enclave-encrypt branch from cde2ffb to 0f31ad7 Compare March 9, 2024 20:47
@oliviathet oliviathet changed the title (DO NOT MERGE) Add enclave encrypt package Add enclave encrypt package Mar 9, 2024
@oliviathet oliviathet changed the title Add enclave encrypt package Add enclave encrypt package and use go 1.21 Mar 9, 2024
@oliviathet oliviathet changed the base branch from olivia/update-swagger-v2024.2.2 to main March 10, 2024 18:33
@oliviathet oliviathet marked this pull request as ready for review March 10, 2024 18:39
@oliviathet oliviathet requested review from emostov and timurnkey March 10, 2024 18:41
Copy link
Contributor

@timurnkey timurnkey left a comment

Choose a reason for hiding this comment

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

LGTM 🚀 - a few non-blocking comments

@@ -33,7 +33,7 @@ func Test_FromTkPrivateKey(t *testing.T) {
// NIST CURVE: P-256
privateKeyFromOpenSSL := "487f361ddfd73440e707f4daa6775b376859e8a3c9f29b3bb694a12927c0213c"
apiKey, err := apikey.FromTurnkeyPrivateKey(privateKeyFromOpenSSL)
assert.Nil(t, err)
require.NoError(t, err)
Copy link
Contributor

Choose a reason for hiding this comment

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

omg we've needed this so bad for e2e tests

}

// Decrypt a message from the server.
func (c *EnclaveEncryptClient) AuthDecrypt(payload string) (plaintext []byte, err error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the difference between Decrypt and AuthDecrypt? Could you update the comment to explain when one is used vs the other? They both currently show:

// Decrypt a message from the server.

)

// An instance of the client side for enclave encrypt protocol. This should only be used for either
// a SINGLE send or a single receive.
Copy link
Contributor

Choose a reason for hiding this comment

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

we could "enforce" this by setting a private boolean value when it has been "used", but that doesn't necessarily prevent misuse 🤷

@oliviathet oliviathet merged commit 69b2ca0 into main Mar 11, 2024
3 checks passed
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.

2 participants