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

feat: atchops_rsa_key_generate_base64 #419

Merged
merged 5 commits into from
Oct 4, 2024

Conversation

JeremyTubongbanua
Copy link
Member

@JeremyTubongbanua JeremyTubongbanua commented Oct 4, 2024

- What I did

  • Added a new atchops_rsa function: atchops_rsa_key_generate_base64
  • Refactored atchops_rsa_key_generate to utilize the new atchops_rsa_key_generate_base64 function
  • Added a test to ensure that atchops_rsa_key_generate_base64: 1. properly generated a key, 2. the keys could be used to populate our rsa key srtucts and 3. the keys could be used to encrypt/decrypt a basic plaintext
  • Refactored test_rsa_generate to test_rsa_key_generate

- How to verify it

  • New test passes
  • and previous tests pass

- Description for the changelog
feat: atchops_rsa_key_generate_base64

@JeremyTubongbanua JeremyTubongbanua self-assigned this Oct 4, 2024
@JeremyTubongbanua JeremyTubongbanua marked this pull request as ready for review October 4, 2024 15:51
@XavierChanth
Copy link
Member

Can you explain a little more about history of aes generate vs history of rsa generate, we had an aes_generate_base64 and it was removed to keep the public interface simple, so why are we adding rsa_generate_base64

@JeremyTubongbanua
Copy link
Member Author

To put it simply, atchops is a wrapper around MbedTLS (we make it simple for us to call MbedTLS for our use case)

MbedTLS AES generation: outputs bytes
MbedTLS RSA generation: outputs base64

So therefore

Atchops AES generation: outputs bytes
Atchops RSA generation: outputs base64

@XavierChanth XavierChanth merged commit 541af13 into trunk Oct 4, 2024
8 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