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

Crypto package for rn encoding/decoding/decryption #278

Merged
merged 12 commits into from
May 8, 2024
Merged

Conversation

moe-dev
Copy link
Contributor

@moe-dev moe-dev commented May 6, 2024

Summary & Motivation

This package will serve as the primitives associated with decryption, encryption and keygen. The goal here was originally to make email auth available in a much simpler way for rn clients, but this actually is just a purjs implementation for any runtime for (primarily) hpke decryption. Currently there are some hardcoded values that are tk specific but a fast-follow is generalizing this for anyone to use.

How I Tested These Changes

Did you add a changeset?

If updating one of our packages, you'll likely need to add a changeset to your PR. To do so, run pnpm changeset. pnpm changeset will generate a file where you should write a human friendly message about the changes. Note how this (example) includes the package name (should be auto added by the command) along with the type of semver change (major.minor.patch) (which you should set).

These changes will be used at release time to determine what packages to publish and how to bump their version. For more context see this comment.

Copy link

socket-security bot commented May 6, 2024

Copy link

codesandbox-ci bot commented May 6, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@moe-dev moe-dev force-pushed the moe/crypto-pkg branch 6 times, most recently from a0979f2 to 8d3b31d Compare May 7, 2024 18:34
Copy link
Contributor

@r-n-o r-n-o left a comment

Choose a reason for hiding this comment

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

OMG it's happening!! 🎉

packages/crypto/src/constants.ts Outdated Show resolved Hide resolved
packages/crypto/package.json Outdated Show resolved Hide resolved
packages/crypto/src/crypto.ts Outdated Show resolved Hide resolved
packages/crypto/src/crypto.ts Outdated Show resolved Hide resolved
packages/crypto/src/crypto.ts Outdated Show resolved Hide resolved
packages/crypto/src/crypto.ts Outdated Show resolved Hide resolved
packages/crypto/src/crypto.ts Outdated Show resolved Hide resolved
packages/crypto/src/crypto.ts Outdated Show resolved Hide resolved
packages/crypto/src/crypto.ts Show resolved Hide resolved
packages/crypto/src/crypto.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@andrewkmin andrewkmin left a comment

Choose a reason for hiding this comment

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

Looking good for the most part. Shaping up to have 3 separate concerns: encoding-related, crypto(graphy), and math. Ultimately trust your judgment on how to divvy it all up

packages/crypto/src/constants.ts Outdated Show resolved Hide resolved
packages/crypto/src/constants.ts Outdated Show resolved Hide resolved
packages/crypto/src/constants.ts Outdated Show resolved Hide resolved
packages/crypto/src/crypto.ts Outdated Show resolved Hide resolved
packages/crypto/src/crypto.ts Outdated Show resolved Hide resolved
packages/crypto/src/crypto.ts Outdated Show resolved Hide resolved
packages/crypto/src/crypto.ts Outdated Show resolved Hide resolved
packages/crypto/src/crypto.ts Outdated Show resolved Hide resolved
packages/crypto/src/crypto.ts Outdated Show resolved Hide resolved
packages/crypto/src/crypto.ts Outdated Show resolved Hide resolved
@moe-dev moe-dev force-pushed the moe/crypto-pkg branch 4 times, most recently from 6bdc724 to cd6088a Compare May 7, 2024 22:15
@moe-dev moe-dev force-pushed the moe/crypto-pkg branch 3 times, most recently from 1d8b8fe to fec03c3 Compare May 8, 2024 16:49
@moe-dev moe-dev marked this pull request as ready for review May 8, 2024 17:19
Copy link
Collaborator

@andrewkmin andrewkmin left a comment

Choose a reason for hiding this comment

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

🔥 just some minor comments. looking ready to ship soon!

packages/crypto/src/crypto.ts Outdated Show resolved Hide resolved
packages/crypto/src/crypto.ts Outdated Show resolved Hide resolved
packages/crypto/src/crypto.ts Outdated Show resolved Hide resolved
packages/crypto/src/crypto.ts Outdated Show resolved Hide resolved
packages/crypto/src/crypto.ts Outdated Show resolved Hide resolved
packages/crypto/src/__tests__/crypto-test.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@andrewkmin andrewkmin left a comment

Choose a reason for hiding this comment

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

lgtm 🚀🚀🚀

packages/crypto/src/crypto.ts Show resolved Hide resolved
@moe-dev moe-dev merged commit e24cebf into main May 8, 2024
5 checks passed
@moe-dev moe-dev deleted the moe/crypto-pkg branch May 8, 2024 19:25
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.

None yet

3 participants