@@ -68,7 +68,7 @@ class SE05XClass
6868 * @return 0 on Failure 1 on Success
6969 */
7070 int generatePrivateKey (int keyID, byte keyBuf[], size_t keyBufMaxLen, size_t * keyLen);
71-
71+
7272 /* * generatePublicKey
7373 *
7474 * Reads ECCurve_NIST_P256 public key from KeyID. Public key will be available
@@ -117,7 +117,7 @@ class SE05XClass
117117 * @param[in] inLen Input data length
118118 *
119119 * @return 0 on Failure 1 on Success
120- */
120+ */
121121 int updateSHA256 (const byte in[], size_t inLen);
122122
123123 /* * endSHA256
@@ -128,9 +128,9 @@ class SE05XClass
128128 * @param[in,out] outLen Size of output data buffer, SHA256 length
129129 *
130130 * @return 0 on Failure 1 on Success
131- */
131+ */
132132 int endSHA256 (byte out[], size_t * outLen);
133-
133+
134134 /* * SHA256
135135 *
136136 * One-shot SHA256
@@ -142,15 +142,15 @@ class SE05XClass
142142 * @param[out] outLen SHA256 length
143143 *
144144 * @return 0 on Failure 1 on Success
145- */
145+ */
146146 int SHA256 (const byte in[], size_t inLen, byte out[], size_t outMaxLen, size_t * outLen);
147147
148148 /* * Sign
149149 *
150150 * Computes ECDSA signature using key stored in KeyID SE050 object.
151151 * Output buffer is filled with the signature in DER format:
152- *
153- * | 0x30 | payloadsize 1 byte | 0x02 | R length 1 byte | padding 0x00 (if length 0x21) | R values 32 bytes
152+ *
153+ * | 0x30 | payloadsize 1 byte | 0x02 | R length 1 byte | padding 0x00 (if length 0x21) | R values 32 bytes
154154 * | 0x02 | S length 1 byte | padding 0x00 (if length 0x21) | S values 32 bytes
155155 *
156156 * SHA256 -> private Key -> Signature
@@ -163,7 +163,7 @@ class SE05XClass
163163 * @param[out] sigLen signature length
164164 *
165165 * @return 0 on Failure 1 on Success
166- */
166+ */
167167 int Sign (int keyID, const byte hash[], size_t hashLen, byte sig[], size_t maxSigLen, size_t * sigLen);
168168
169169 /* * Verify
@@ -173,28 +173,28 @@ class SE05XClass
173173 * Input SHA256
174174 * ? Match ?
175175 * Signature -> public Key -> Original SHA256
176- *
176+ *
177177 * @param[in] keyID SE050 object ID containing the key
178178 * @param[in] hash Input SHA256 used to compute the signature
179179 * @param[in] hashLen SHA256 length
180180 * @param[in] sig Input buffer containint the signature
181181 * @param[in] sigLen signature length
182182 *
183183 * @return 0 on Failure (Not match) 1 on Success (Match)
184- */
184+ */
185185 int Verify (int keyID, const byte hash[], size_t hashLen, const byte sig[],size_t sigLen);
186186
187187 /* * readBinaryObject
188188 *
189189 * Reads binary data from SE050 object.
190- *
190+ *
191191 * @param[in] ObjectId SE050 object ID containing data
192192 * @param[out] data Output data buffer
193193 * @param[in] dataMaxLen Output data buffer size
194194 * @param[out] sig Binary object size
195195 *
196196 * @return 0 on Failure 1 on Success
197- */
197+ */
198198 int readBinaryObject (int ObjectId, byte data[], size_t dataMaxLen, size_t * length);
199199
200200 /* * AES_ECB_encrypt
@@ -268,43 +268,43 @@ class SE05XClass
268268 /* * writeBinaryObject
269269 *
270270 * Writes binary data into SE050 object.
271- *
271+ *
272272 * @param[in] ObjectId SE050 object ID
273273 * @param[in] data Input data buffer
274274 * @param[in] length Input data buffer size
275275 *
276276 * @return 0 on Failure 1 on Success
277- */
277+ */
278278 int writeBinaryObject (int ObjectId, const byte data[], size_t length);
279279
280280 /* * existsBinaryObject
281281 *
282282 * Checks if Object exist
283- *
283+ *
284284 * @param[in] ObjectId SE050 object ID
285285 *
286286 * @return 0 on Failure (Not exist) 1 on Success (Exists)
287- */
287+ */
288288 int existsBinaryObject (int objectId);
289289
290290 /* * deleteBinaryObject
291291 *
292292 * Deletes SE050 object
293- *
293+ *
294294 * @param[in] ObjectId SE050 object ID
295295 *
296296 * @return 0 on Failure 1 on Success
297- */
297+ */
298298 int deleteBinaryObject (int objectId);
299299
300300 /* * deleteBinaryObject
301301 *
302302 * Deletes all SE050 user objects
303- *
303+ *
304304 * @param[in] ObjectId SE050 object ID
305305 *
306306 * @return 0 on Failure 1 on Success
307- */
307+ */
308308 int deleteAllObjects ();
309309
310310 /* ECCX08 legacy API*/
@@ -344,20 +344,20 @@ class SE05XClass
344344 * Input SHA256
345345 * ? Match ?
346346 * Signature -> public Key -> Original SHA256
347- *
347+ *
348348 * @param[in] message Input SHA256 used to compute the signature 32 bytes
349349 * @param[in] sig Input buffer containint the signature R S values 64bytes
350350 * @param[in] pubkey Public key X Y values 64bytes
351351 *
352352 * @return 0 on Failure (Not match) 1 on Success (Match)
353- */
353+ */
354354 int ecdsaVerify (const byte message[], const byte signature[], const byte pubkey[]);
355355
356356 /* * ecSign
357357 *
358358 * Computes ECDSA signature using key stored in KeyID SE050 object.
359359 * Output buffer is filled with the signature R S values:
360- *
360+ *
361361 * | R values 32 bytes | S values 32 bytes |
362362 *
363363 * SHA256 -> private Key -> Signature
@@ -367,31 +367,31 @@ class SE05XClass
367367 * @param[out] signature Output buffer containint the signature 64 bytes
368368 *
369369 * @return 0 on Failure 1 on Success
370- */
370+ */
371371 int ecSign (int slot, const byte message[], byte signature[]);
372372
373373 /* * readSlot
374374 *
375375 * Reads binary data from SE050 object.
376- *
376+ *
377377 * @param[in] ObjecslottId SE050 object ID containing data
378378 * @param[out] data Output data buffer
379379 * @param[in] length Number of bytes to read
380380 *
381381 * @return 0 on Failure 1 on Success
382- */
382+ */
383383 int readSlot (int slot, byte data[], int length);
384384
385385 /* * writeSlot
386386 *
387387 * Writes binary data into SE050 object.
388- *
388+ *
389389 * @param[in] ObjectId SE050 object ID
390390 * @param[in] data Input data buffer
391391 * @param[in] length Number of bytes to write
392392 *
393393 * @return 0 on Failure 1 on Success
394- */
394+ */
395395 int writeSlot (int slot, const byte data[], int length);
396396
397397 inline int locked () { return 1 ; }
0 commit comments