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

Implement base64 encoder, avoid allocation in codecs_ecdsa_secp256k1.nim #506

Open
4 tasks
Vindaar opened this issue Jan 1, 2025 · 0 comments
Open
4 tasks

Comments

@Vindaar
Copy link
Collaborator

Vindaar commented Jan 1, 2025

As part of PR #490, which adds support for ECDSA we will add a basic PEM file writer for public and private keys. However, the current implementation depends on the standard library, because the data is base64 encoded. While we have a base64 decoder:

https://github.com/mratsim/constantine/blob/master/constantine/serialization/codecs.nim#L114-L174

we lack a base64 encoder.

Further, the current PEM file implementation allocates for the string we write to. These things should be addressed in the near future.

  • Implement base64 encoder
  • Write tests for base64 encoder
  • Write tests for existing base64 decoder
  • Avoid allocation for PEM file generator
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

No branches or pull requests

1 participant