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

Issue related to decrypt #12

Open
qkrdkwl9090 opened this issue Feb 17, 2022 · 3 comments
Open

Issue related to decrypt #12

qkrdkwl9090 opened this issue Feb 17, 2022 · 3 comments

Comments

@qkrdkwl9090
Copy link

qkrdkwl9090 commented Feb 17, 2022

The library is used to encrypt data, but the basic structure is in the form of "v1.aesgcm256.~~~~~.~~~~~~~". However, if the content is decoded using online decrypt in the "AES-256-GCM" mode, the content cannot be confirmed normally.

We are concerned about problems that may arise in the future. For example, although the library has been developed and later converted, the encryption method has been changed, but the encryption of existing encrypted data cannot be broken.

First of all, if the current encryption is normal, the data will come out in a structure called "v1.aesgcm256.~~~~~.~~~~~~~", is that correct?

@franky47
Copy link
Member

I'm not sure I understand your question.

The serialised ciphertext format is defined in @47ng/cloak. For now only AES-GCM with 256bit keys is supported, but should other ciphersuites be added, the string representation would follow a similar pattern.

@qkrdkwl9090
Copy link
Author

I want to know if I can decrypt data without your library after using your library.

@franky47
Copy link
Member

I see. I will publish the ciphertext format in the source library.

An alternative would be BYOCipher, with hooks configurable when setting up the middleware to encrypt and decrypt (has to be string <=> string though, to keep the data type identical for Prisma and the underlying DB engine).

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

2 participants