Skip to content

ostree signing EC25519 key generation #3256

Closed Answered by jbtrystram
jbtrystram asked this question in Q&A
Discussion options

You must be logged in to vote

Ok solved, here is what works for me :

# Generate the key
openssl genpkey -algorithm ed25519 -outform PEM -out $KEY_FILE

# Extract the pubkey 
PUBKEY="$(openssl pkey -outform DER -pubout -in ${KEY_FILE} | tail -c 32 | base64)"

## write the pubkey in overrides
echo $PUBKEY > overrides/rootfs/etc/ostree/initramfs-root-binding.key

# Convert the private key to base64 for ostree signing 
## Extract the seed
SEED="$(openssl pkey -outform DER -in ${KEY_FILE} | tail -c 32 | base64)"
## Secret key is concantination of SEED and PUBLIC
echo ${SEED}${PUBKEY} | base64 -d | base64 -w 0 > ${KEY_FILE}.ed25519

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jbtrystram
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant