cardano-foundation / ledger-app-cardano

Cardano Ledger App for Ledger Nano S
Apache License 2.0
26 stars 14 forks source link

why can't the ledger app return serialised trx cbor after signing? #16

Closed ashisherc closed 3 years ago

ashisherc commented 3 years ago

The CBOR serialization has caveats when decoding and encoding the same data set. for eg. A map and an array can be definite and also indefinite, this produces 2 different CBORs resulting in different transaction id but the same transaction.

The fact that the ledger returns only the signature requires the application to build a cbor. Which might be different than the one the ledger built and signed. This happens with different language CBOR implementations, one example is the canonical ordering with tokens.

Trezor device returns the serialized CBOR and avoids these issues.

ashisherc commented 3 years ago

It is due to the memory limitation on the device.