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

CipherSaber2 operation added. #952

Merged
merged 4 commits into from
Mar 5, 2020
Merged

CipherSaber2 operation added. #952

merged 4 commits into from
Mar 5, 2020

Conversation

n1073645
Copy link
Contributor

Encrypt:

  • Generates a random key and concatenates it to the key passed to it.
  • Mixes the states based off of the initialisation vector and the number of rounds passed to it.
  • Then xor them together.

Decrypt:

  • This cipher is symmetric and we store the key in the first 10 bytes of the cipher-text.
  • Then use that in the same process as encryption.

@mva1985
Copy link

mva1985 commented Jan 30, 2020

that's awesome!!!

Copy link
Member

@n1474335 n1474335 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!

src/core/operations/CipherSaber2.mjs Outdated Show resolved Hide resolved
src/core/operations/CipherSaber2.mjs Outdated Show resolved Hide resolved
{
name: "Mode",
type: "option",
value: ["Encrypt", "Decrypt"]
Copy link
Member

Choose a reason for hiding this comment

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

I'd prefer separate operations for encrypt and decrypt, in line with other cipher ops.

Copy link
Member

Choose a reason for hiding this comment

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

It probably makes sense to pull the code out into a library so you don't duplicate it in each op.

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.

3 participants