Skip to content

Commit

Permalink
EdDSA => ECDSA
Browse files Browse the repository at this point in the history
browsers don't currently support EdDSA
  • Loading branch information
AlexErrant committed Aug 10, 2023
1 parent 2f3aee5 commit c054be8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cwa/src/peerSync.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { importPKCS8, SignJWT } from "jose"
import { type UserId } from "shared"

export const alg = "EdDSA"
export const alg = "ES512"

export async function getPeerToken(userId: UserId, privateKeyString: string) {
const privateKey = await importPKCS8(privateKeyString, alg)
Expand Down
6 changes: 4 additions & 2 deletions design-decisions/example.pentive.secrets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ export developmentGithubSecret=
export productionGithubSecret=

# generate via:
# openssl genpkey -algorithm ed25519 -out peerSyncPrivateKey.key
# openssl pkey -in peerSyncPrivateKey.key -pubout -out peerSyncPublicKey.pem
# openssl ecparam -name secp521r1 -genkey -noout -out private.ec.key
# openssl pkcs8 -topk8 -nocrypt -in private.ec.key -out private.pem
# openssl ec -in private.pem -pubout -out public.pem
# use public.pem and private.pem
export developmentPeerSyncPublicKey="-----BEGIN PUBLIC KEY-----
foo
-----END PUBLIC KEY-----"
Expand Down

0 comments on commit c054be8

Please sign in to comment.