@@ -364,18 +364,18 @@ short ecSign256(
364364 /**
365365 * Implementation of HKDF as per RFC5869 https://datatracker.ietf.org/doc/html/rfc5869#section-2
366366 *
367- * @param ikm is the buffer containing input key material.
368- * @param ikmOff is the start of the input key.
369- * @param ikmLen is the length of the input key.
370- * @param salt is the buffer containing the salt.
367+ * @param ikm is the buffer containing input key material.
368+ * @param ikmOff is the start of the input key.
369+ * @param ikmLen is the length of the input key.
370+ * @param salt is the buffer containing the salt.
371371 * @param saltOff is the start of the salt buffer.
372372 * @param saltLen is the length of the salt buffer.
373- * @param info is the buffer containing the application specific information
373+ * @param info is the buffer containing the application specific information
374374 * @param infoOff is the start of the info buffer.
375375 * @param infoLen is the length of the info buffer.
376- * @param out is the output buffer.
377- * @param outOff is the start of the output buffer.
378- * @param outLen is the length of the expected out buffer.
376+ * @param out is the output buffer.
377+ * @param outOff is the start of the output buffer.
378+ * @param outLen is the length of the expected out buffer.
379379 * @return Length of the out buffer which is outLen.
380380 */
381381 short hkdf (
@@ -395,14 +395,14 @@ short hkdf(
395395 /**
396396 * This function performs ECDH key agreement and generates a secret.
397397 *
398- * @param privKey is the buffer containing the private key from first party.
399- * @param privKeyOff is the offset of the private key buffer.
400- * @param privKeyLen is the length of the private key buffer.
401- * @param publicKey is the buffer containing the public key from second party.
398+ * @param privKey is the buffer containing the private key from first party.
399+ * @param privKeyOff is the offset of the private key buffer.
400+ * @param privKeyLen is the length of the private key buffer.
401+ * @param publicKey is the buffer containing the public key from second party.
402402 * @param publicKeyOff is the offset of the public key buffer.
403403 * @param publicKeyLen is the length of the public key buffer.
404- * @param secret is the output buffer.
405- * @param secretOff is the offset of the output buffer.
404+ * @param secret is the output buffer.
405+ * @param secretOff is the offset of the output buffer.
406406 * @return The length of the secret.
407407 */
408408 short ecdhKeyAgreement (
@@ -418,15 +418,15 @@ short ecdhKeyAgreement(
418418 /**
419419 * This is a oneshort operation that verifies the data using EC public key
420420 *
421- * @param pubKey is the public key buffer.
422- * @param pubKeyOffset is the start of the public key buffer.
423- * @param pubKeyLen is the length of the public key.
424- * @param inputDataBuf is the buffer of the input data.
425- * @param inputDataStart is the start of the input data buffer.
426- * @param inputDataLength is the length of the input data buffer in bytes.
427- * @param signatureDataBuf is the buffer the signature input data.
421+ * @param pubKey is the public key buffer.
422+ * @param pubKeyOffset is the start of the public key buffer.
423+ * @param pubKeyLen is the length of the public key.
424+ * @param inputDataBuf is the buffer of the input data.
425+ * @param inputDataStart is the start of the input data buffer.
426+ * @param inputDataLength is the length of the input data buffer in bytes.
427+ * @param signatureDataBuf is the buffer the signature input data.
428428 * @param signatureDataStart is the start of the signature input data.
429- * @param signatureDataLen is the length of the signature input data.
429+ * @param signatureDataLen is the length of the signature input data.
430430 * @return true if verification is successful, otherwise false.
431431 */
432432 boolean ecVerify256 (
@@ -443,11 +443,11 @@ boolean ecVerify256(
443443 /**
444444 * This is a oneshot operation that signs the data using device unique key.
445445 *
446- * @param ecPrivKey instance of KMECDeviceUniqueKey to sign the input data.
447- * @param inputDataBuf is the buffer of the input data.
448- * @param inputDataStart is the start of the input data buffer.
446+ * @param ecPrivKey instance of KMECDeviceUniqueKey to sign the input data.
447+ * @param inputDataBuf is the buffer of the input data.
448+ * @param inputDataStart is the start of the input data buffer.
449449 * @param inputDataLength is the length of the input data buffer in bytes.
450- * @param outputDataBuf is the output buffer that contains the signature.
450+ * @param outputDataBuf is the output buffer that contains the signature.
451451 * @param outputDataStart is the start of the output data buffer.
452452 * @return length of the decrypted data.
453453 */
@@ -603,6 +603,7 @@ KMOperation initAsymmetricOperation(
603603
604604 /**
605605 * Returns the value of the attestation id.
606+ *
606607 * @param tag - attestation id tag key as defined KMType.
607608 * @param buffer - memorey buffer in which value of the id must be copied
608609 * @param start - start offset in the buffer
@@ -631,7 +632,8 @@ KMOperation initAsymmetricOperation(
631632 short getBootState ();
632633
633634 /**
634- * Returns true if device bootloader is locked. Part of RoT. Part of data sent by the aosp bootloader.
635+ * Returns true if device bootloader is locked. Part of RoT. Part of data sent by the aosp
636+ * bootloader.
635637 */
636638 boolean isDeviceBootLocked ();
637639
@@ -643,11 +645,11 @@ KMOperation initAsymmetricOperation(
643645 /**
644646 * Creates an ECKey instance and sets the public and private keys to it.
645647 *
646- * @param testMode to indicate if current execution is for test or production.
647- * @param pubKey buffer containing the public key.
648- * @param pubKeyOff public key buffer start offset.
649- * @param pubKeyLen public key buffer length.
650- * @param privKey buffer containing the private key.
648+ * @param testMode to indicate if current execution is for test or production.
649+ * @param pubKey buffer containing the public key.
650+ * @param pubKeyOff public key buffer start offset.
651+ * @param pubKeyLen public key buffer length.
652+ * @param privKey buffer containing the private key.
651653 * @param privKeyOff private key buffer start offset.
652654 * @param privKeyLen private key buffer length.
653655 * @return instance of KMDeviceUniqueKey.
@@ -667,34 +669,40 @@ KMDeviceUniqueKey createDeviceUniqueKey(boolean testMode,
667669 /**
668670 * Persists the additional certificate chain in persistent memory.
669671 *
670- * @param buf buffer containing the cbor encoded additional certificate chain.
672+ * @param buf buffer containing the cbor encoded additional certificate chain.
671673 * @param offset start offset of the buffer.
672- * @param len length of the buffer.
674+ * @param len length of the buffer.
673675 */
674676 void persistAdditionalCertChain (byte [] buf , short offset , short len );
675677
676678 /**
677679 * Returns the additional certificate chain length.
680+ *
678681 * @return length of the encoded additional certificate chain.
679682 */
680683 short getAdditionalCertChainLength ();
681684
682685 /**
683- * Reads the additional certificate chain into the buffer.
684- * @param buffer out buffer in which the chain is copied.
685- * @param start start offset of the buffer
686- * @return length of the additional cert chain.
686+ * Returns the additional certificate chain.
687+ *
688+ * @return additional cert chain.
687689 */
688690 byte [] getAdditionalCertChain ();
689691
690692 /**
691693 * Generate boot certificate chain.
694+ *
692695 * @param testMode to indicate if current execution is for test or production.
693696 * @param scratchPad buffer to store temporary results.
694697 * @return instance of the boot certificate chin.
695698 */
696699 short generateBcc (boolean testMode , byte [] scratchPad );
697700
701+ /**
702+ * Returns the boot certificate chain.
703+ *
704+ * @return boot certificate chain.
705+ */
698706 byte [] getBootCertificateChain ();
699707
700708
0 commit comments