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

Trying to encrypt using pk (elGamal ecc), but getting aes error. #436

Open
CashCode opened this issue Feb 23, 2023 · 0 comments
Open

Trying to encrypt using pk (elGamal ecc), but getting aes error. #436

CashCode opened this issue Feb 23, 2023 · 0 comments

Comments

@CashCode
Copy link

CashCode commented Feb 23, 2023

I'm using sjcl-including-ecc package
keys pair generation (OK):
sjcl.ecc.elGamal.generateKeys(sjcl.ecc.curves.c384);

ct = sjcl.encrypt(sk, JSON.stringify(dataArray), { public: publicKeys })
Gives error:

  toString: [Function (anonymous)],
  message: 'invalid aes key size'
}
    at Object.<anonymous> (\source\index.js:102:11)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47

'invalid aes key size'
I don't need AES, I need to encrypt data using my private key using elGamal-ecc

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