You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this example, this only works if each user has the others private key? Lets say person A is initiating the group chat with B and C. User A would only have access to the public keys of the other users and not the private keys, so I'm not sure how the shared keys can be created securely like this.
My goal here is for the initiator of a group chat to send an encrypted message to the other parties, where those people can decrypt the message.
Sidenote: Would user A have to send the shared key to the rest of the party or can the others compute the shared key locally?
var EC = require('elliptic').ec;
var ec = new EC('curve25519');
var A = ec.genKeyPair();
var B = ec.genKeyPair();
var C = ec.genKeyPair();
var AB = A.getPublic().mul(B.getPrivate())
var BC = B.getPublic().mul(C.getPrivate())
var CA = C.getPublic().mul(A.getPrivate())
var ABC = AB.mul(C.getPrivate())
var BCA = BC.mul(A.getPrivate())
var CAB = CA.mul(B.getPrivate())
console.log(ABC.getX().toString(16))
console.log(BCA.getX().toString(16))
console.log(CAB.getX().toString(16))
The text was updated successfully, but these errors were encountered:
In this example, this only works if each user has the others private key? Lets say person
A
is initiating the group chat withB
andC
. UserA
would only have access to the public keys of the other users and not the private keys, so I'm not sure how the shared keys can be created securely like this.My goal here is for the initiator of a group chat to send an encrypted message to the other parties, where those people can decrypt the message.
Sidenote: Would user
A
have to send the shared key to the rest of the party or can the others compute the shared key locally?The text was updated successfully, but these errors were encountered: