AnsweredAssumed Answered

How can I generate srk_hash from srk.pub using openssl?

Question asked by Richard Bean on May 15, 2018
Latest reply on May 16, 2018 by Yiping Wang

Given an existing RSA public/private key pair in PEM format files, I would like to use the 'openssl' utility to generate the SRK Hash of the public key in an offline environment without relying on Flexbuilder. I would expect to be able to extract the binary public key from its PEM file, and perform a SHA-256 hash on it with hex output. But when I do so, the resulting hash does not match the hash that Flexbuilder produces in 'srk_hash.txt'. For example, on a Linux host:

 

  grep -v 'RSA PUBLIC KEY' srk.pub | base64 -d | openssl dgst -sha256 -hex | cut -d' ' -f2

  tail srk_hash.txt

 

Given a file such as 'srk.pub' containing an RSA public key in PEM (PKCS#1) format, what invocation using the 'openssl' utility will produce the same hex formatted hash of the public key that appears in 'srk_hash.txt'?

 

My version of Flexbuilder is from LSDK 18.03; the target machine is a LS1012ARDB.

 

Thank you.

Outcomes