Security User Guide: Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA

ID 683453
Date 3/06/2020
Public
Document Table of Contents

3.10.1. HSM_MANAGER.get_public_key(public_key)

This method returns an instance of a public key that is described by ‘public_key’, which was provided via a command-line option (--root_key or --code_signing_key). The HSM manager must know how to properly identify the key on the HSM given this string.

The public key instance is required to supply the public methods described in the sections that follow. The PKCS #11 implementation of this function, get_public_key, is below:

def get_public_key(self, public_key):
	try:
		key_, local_key = self.get_key(public_key, ObjectClass.PUBLIC_KEY)
		key_ = key_[Attribute.EC_POINT]

	except pkcs11.NoSuchKey:
		pass # No key found
	except pkcs11.MultipleObjectsReturned:
		pass # Multiple keys found
	return _PUBLIC_KEY(key_[3:], local_key)