Skip to content

Instantly share code, notes, and snippets.

@hellwolf
Created April 7, 2019 09:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hellwolf/50e9b693c3f15428ed49b2d1063584fa to your computer and use it in GitHub Desktop.
Save hellwolf/50e9b693c3f15428ed49b2d1063584fa to your computer and use it in GitHub Desktop.
test ecdh1 derive mechanism
#!/bin/bash
openssl pkeyutl -derive -inkey new-secp384r1-private-key.pem -peerkey XXXXXXXX-pin1-public-key.pem | xxd -p | tr '\n' '|' | sed 's/|//g'
echo
pkcs11-tool --derive --token-label PIN1 --login --id 01 -m ECDH1-DERIVE --input-file new-secp384r1-public-key.der --output-file >(xxd -p | tr '\n' '|' | sed 's/|//g')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment