Nitrokey HSM Key Attestation Questions

In the scsh3gui shell script there is a remark:

# If you are using a HDPI Display and the Smart Card Shell appears to small, then try adding
#  -Dsun.java2d.uiScale=2
# to scale the display by 2. The value must be an integer.

Unfortunately Java / Swing does not support HPDI very well and there is no auto-detection. And I doubt that is will change, as Swing is no longer actively developed. Porting the shell UI to a new framework is on the ToDo list, but with very low priority.

For storing the CV-REQ there are actually two options at the APDU level. You can either return the CV-REQ as part of the GENERATE ASYMMETRIC KEY PAIR or have the SmartCard-HSM store the CV-REQ in the associated file. The former is typically used when a remote system has established secure messaging and will immediately process the CV-REQ to issue the certificate. The later is typically used, if the CV-REQ must be stored (at least for a certain period of time) or if the APDU communication has a length limitation and obtaining the CV-REQ must be done in smaller reads.

OpenSC uses the later variant, as one would typically use individual invocations of the pksc11-tool to do the individual steps of key generation and certificate issuance.

The key-attestation.js just wants to demonstrate the principle, but adding storeEndEntityCertificate() make of course sense. I’ve pushed the change in the sc-hsm-sdk-scripts repo in the CDN.