As of a4dcb80458dff521ac8767b0e0067c1e14fab98, ndn_lite_default_ecdsa_sign invokes uECC_sign to create a signature and uses it directly as TLV-VALUE of SignatureValue.
In NDN Packet Format 0.3,
The value of SignatureValue of SignatureSha256WithEcdsa is a DER encoded DSA signature as defined in Section 2.2.3 in RFC 3279.
However, the signature created by uECC_sign is in raw format, not DER format.
To solve this issue, transform the raw format signature into DER format through an ASN.1 encoder.
I recommend doing this transformation in backend, but the transformation functions should be made available to all backend implementations as other backends could need them as well.
Thank you for pointing this out; the ecdsa signatures generated and verified by ndn-lite are now in DER format, with the transformation being done in backend (ndn-lite-default-ecc-impl.c).
As of a4dcb80458dff521ac8767b0e0067c1e14fab98,
ndn_lite_default_ecdsa_sign
invokesuECC_sign
to create a signature and uses it directly as TLV-VALUE of SignatureValue.In NDN Packet Format 0.3,
However, the signature created by
uECC_sign
is in raw format, not DER format.To solve this issue, transform the raw format signature into DER format through an ASN.1 encoder. I recommend doing this transformation in backend, but the transformation functions should be made available to all backend implementations as other backends could need them as well.