You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This specification defines a user-facing asset fingerprint as a bech32-encoded blake2b-160 digest of the concatenation of the policy id and the asset name.
16
19
17
-
# Motivation
20
+
##Motivation: why is this CIP necessary?
18
21
19
22
The Mary era of Cardano introduces the support for native assets. On the blockchain, native assets are uniquely identified by both their so-called policy id and asset name. Neither the policy id nor the asset name are intended to be human-readable data.
20
23
21
24
On the one hand, the policy id is a hash digest of either a monetary script or a Plutus script. On the other hand, the asset name is an arbitrary bytestring of up to 32 bytes (which does not necessarily decode to a valid UTF-8 sequence). In addition, it is possible for an asset to have an empty asset name, or, for assets to have identical asset names under different policies.
22
25
23
26
Because assets are manipulated in several user-facing features on desktop and via hardware applications, it is useful to come up with a short(er) and human-readable identifier for assets that user can recognize and refer to when talking about assets. We call such an identifier an _asset fingerprint_.
24
27
25
-
# Specification
28
+
##Specification
26
29
27
30
We define the asset fingerprint in pseudo-code as:
where `|` designates the concatenation of two byte strings. The `digest-length` is given in _bytes_ (so, 160 bits).
41
44
42
-
#Rationale
45
+
### Reference Implementation
43
46
44
-
## Design choices
45
-
46
-
- The asset fingerprint needs to be _somewhat unique_ (although collisions are plausible, see next section) and refer to a particular asset. It must therefore include both the policy id and the asset name.
47
-
48
-
- Using a hash gives us asset id of a same deterministic length which is short enough to display reasonably well on small screens.
49
-
50
-
- We use bech32 as a user-facing encoding since it is both user-friendly and quite common within the Cardano eco-system (e.g. addresses, pool ids, keys).
51
-
52
-
## Security Considerations
53
-
54
-
- With a 160-bit digest, an attacker needs at least 2^80 operations to find a collision. Although 2^80 operations is relatively low (it remains expansive but doable for an attacker), it
55
-
is considered safe within the context of an asset fingerprint as a mean of _user verification_ within a particular wallet. An attacker may obtain advantage if users can be persuaded
56
-
that a certain asset is in reality another (which implies to find a collision, and make both assets at the reach of the user).
57
-
58
-
- We recommend however that in addition to the asset fingerprint, applications also show whenever possible a visual checksum calculated from the policy id and the asset name as specified in [CIP-YET-TO-COME](). Such generated images, which are designed to be unique and easy to distinguish, in combination with a readable asset fingerprint gives strong verification means to end users.
> :information_source:`policy_id` and `asset_name` are hereby base16-encoded; their raw, decoded, versions should be used when computing the fingerprint.
## Rationale: how does this CIP achieve its goals?
153
+
154
+
### Design choices
155
+
156
+
- The asset fingerprint needs to be _somewhat unique_ (although collisions are plausible, see next section) and refer to a particular asset. It must therefore include both the policy id and the asset name.
157
+
158
+
- Using a hash gives us asset id of a same deterministic length which is short enough to display reasonably well on small screens.
159
+
160
+
- We use bech32 as a user-facing encoding since it is both user-friendly and quite common within the Cardano eco-system (e.g. addresses, pool ids, keys).
161
+
162
+
### Security Considerations
163
+
164
+
- With a 160-bit digest, an attacker needs at least 2^80 operations to find a collision. Although 2^80 operations is relatively low (it remains expansive but doable for an attacker), it
165
+
is considered safe within the context of an asset fingerprint as a mean of _user verification_ within a particular wallet. An attacker may obtain advantage if users can be persuaded
166
+
that a certain asset is in reality another (which implies to find a collision, and make both assets at the reach of the user).
167
+
168
+
- We recommend however that in addition to the asset fingerprint, applications also show whenever possible a visual checksum calculated from the policy id and the asset name as specified in [CIP-YET-TO-COME](). Such generated images, which are designed to be unique and easy to distinguish, in combination with a readable asset fingerprint gives strong verification means to end users.
169
+
170
+
## Path to Active
171
+
172
+
### Acceptance Criteria
173
+
174
+
- [x] Asset fingerprints as described have been universally adopted in: wallets, blockchain explorers, query layers, token minting utilities, NFT specifications, and CLI tools.
175
+
176
+
### Implementation Plan
177
+
178
+
- [x] Reference implementations available in both Javascript and Haskell.
179
+
- [x] Public presentation with confirmed interest in adopting this standard in advance of Mary ledger era.
180
+
181
+
## Copyright
172
182
173
-
CC-BY-4.0
183
+
This CIP is licensed under [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/legalcode).
0 commit comments