DASL Testing

2025-06-25 14:56:15 UTC
github.com/hyphacoop/dasl-testing

Explanation

This page holds the results of a test suite for the DASL ecosystem and related specs. It was created with funding from the IPFS Implementation Grants program.

This test suite exists to survey the landscape of existing implementations. By knowing how libraries handle IPFS specs like dag-cbor and CIDs today, the DASL team can create better documents for the future.

Many different specifications are covered by these tests, so it's not expected that all tests would pass for a compliant library. You can filter and group tests below to only see ones that are relevant to you.

Test types:

Summary

Basic

dag-cbor

Libraries

go-ipld-prime v0.21.0
js-dag-cbor 9.2.4
atcute 2.2.4
dag-cbrrr 1.0.1
python-libipld 3.1.1
go-ipld-cbor v0.2.1
serde_ipld_dagcbor 0.6.3

Tests


๐Ÿ”— cid.json

Description Type go-ipld-prime js-dag-cbor atcute dag-cbrrr python-libipld go-ipld-cbor serde_ipld_dagcbor
long CID tag

Data: d9002a582500015512205891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03

Tags: dag-cbor

Description: a longer than necessary CBOR representation of the CID tag is used, which is invalid in dag-cbor

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
valid CID with short tag

Data: d82a582500015512205891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03

Tags: dag-cbor, dasl-cid, c42

Description: a valid CID (raw, SHA-256) using the correct short CBOR representation of the CID tag

roundtrip PASS PASS PASS PASS PASS PASS PASS
invalid CID

Data: d82a4100

Tags: basic

Description: this is tagged as a CID but is not valid, only containing a single zero byte

invalid_in PASS PASS FAIL FAIL PASS PASS PASS
CIDv0

Data: d82a582300122022ad631c69ee983095b5b8acd029ff94aff1dc6c48837878589a92b90dfea317

Tags: dasl-cid

Description: a valid CIDv0, which is invalid as a DASL CID

invalid_in FAIL FAIL FAIL FAIL FAIL FAIL FAIL
invalid hash size

Data: d82a582400015512205891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be

Tags: basic

Description: a CIDv1 with a stated hash size of 32 bytes, but only 31 bytes provided

invalid_in PASS PASS FAIL FAIL PASS PASS PASS
Big DASL CID

Data: d82a58250001551e208e4c7c1b99dbfd50e7a95185fead5ee1448fa904a2fdd778eaf5f2dbfd629a99

Tags: dasl-cid

Description: a valid BLAKE3 CID, also known as Big DASL

roundtrip PASS PASS PASS PASS PASS PASS PASS
empty CID

Data: d82a450001551200

Tags: basic, dasl-cid

Description: a valid CIDv1 with no hash data (hash length of zero)

roundtrip PASS PASS PASS PASS PASS PASS PASS
CIDv1 that isn't raw or cbor

Data: d82a58250001701220e9822efc7c48027a5429fdbd988d02b2b8e4eaee8f62c32bd1021dcf922e05de

Tags: dasl-cid

Description: a valid CIDv1 that uses dag-pb, invalid in the DASL CID spec

invalid_in FAIL FAIL FAIL FAIL FAIL FAIL FAIL
disallowed hash type (SHA-1)

Data: d82a58190001551114f572d396fae9206628714fb2ce00f72e94f2258f

Tags: dasl-cid

Description: a valid CIDv1 that uses the SHA-1 hash, invalid in the DASL CID spec

invalid_in FAIL FAIL FAIL FAIL FAIL FAIL FAIL

๐Ÿ”— concat.json

Description Type go-ipld-prime js-dag-cbor atcute dag-cbrrr python-libipld go-ipld-cbor serde_ipld_dagcbor
concatenated objects / CBOR sequence

Data: 0000

Tags: dag-cbor

Description: a CBOR sequence of two zeros, invalid in the DAG-CBOR spec

invalid_in PASS PASS PASS PASS PASS FAIL PASS

๐Ÿ”— floats.json

Description Type go-ipld-prime js-dag-cbor atcute dag-cbrrr python-libipld go-ipld-cbor serde_ipld_dagcbor
float reduction

Data: f93e00

Tags: rfc8949

Description: a 16-bit float, a valid representation according to RFC 8949

roundtrip FAIL FAIL FAIL FAIL FAIL FAIL FAIL
64-bit floats only

Data: fb3ff8000000000000

Tags: dag-cbor, c42

Description: a 64-bit float, the only valid float representation for dag-cbor

roundtrip PASS PASS PASS PASS PASS PASS PASS
64-bit floats only

Data: f93e00

Tags: dag-cbor, c42

Description: a 16-bit float, an invalid input for dag-cbor

invalid_in FAIL FAIL PASS PASS PASS FAIL PASS
float reduction

Data: fb3ff8000000000000

Tags: rfc8949

Description: a 64-bit float that could be reduced, invalid for RFC 8949

invalid_in FAIL FAIL FAIL FAIL FAIL FAIL FAIL
short NaN

Data: f97e00

Tags: rfc8949, CBOR-Core

Description: the only valid NaN representation for RFC 8949

roundtrip FAIL FAIL FAIL FAIL FAIL FAIL FAIL
long NaN

Data: fb7ff8000000000000

Tags: rfc8949, dag-cbor, c42

Description: an invalid NaN representation, too long (RFC 8949) or because NaNs are invalid (dag-cbor)

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
negative zero float64

Data: fb8000000000000000

Tags: dag-cbor, c42

Description: testing that negative zero can be roundtripped without becoming positive or an integer

roundtrip PASS FAIL FAIL PASS PASS PASS PASS
zero float64

Data: fb0000000000000000

Tags: dag-cbor, c42

Description: a standard float like 0.0 shouldn't become an integer

roundtrip PASS FAIL FAIL PASS PASS PASS PASS
zero float16

Data: f90000

Tags: rfc8949, CBOR-Core

Description: 0.0 as a 16-bit float is valid and required for RFC 8949

roundtrip FAIL FAIL FAIL FAIL FAIL FAIL FAIL
64-bit subnormal number

Data: fb0000000000000001

Tags: basic

Description: subnormal numbers are reduced to zero in some floating point implementations, but should not be here

roundtrip PASS PASS PASS PASS PASS PASS PASS
short NaN

Data: f97e00

Tags: dag-cbor, c42

Description: even short representations of NaN are invalid for dag-cbor

invalid_in FAIL PASS PASS PASS PASS FAIL PASS
short Inf

Data: f97c00

Tags: dag-cbor, c42

Description: infinity is invalid in dag-cbor

invalid_in FAIL PASS PASS PASS PASS FAIL PASS
32-bit Inf

Data: fa7f800000

Tags: dag-cbor, c42

Description: infinity is invalid in dag-cbor

invalid_in FAIL PASS PASS PASS PASS FAIL FAIL
64-bit Inf

Data: fb7ff0000000000000

Tags: dag-cbor, c42

Description: infinity is invalid in dag-cbor

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
short -Inf

Data: f9fc00

Tags: dag-cbor, c42

Description: negative infinity is invalid in dag-cbor

invalid_in FAIL PASS PASS PASS PASS FAIL PASS
32-bit -Inf

Data: faff800000

Tags: dag-cbor, c42

Description: negative infinity is invalid in dag-cbor

invalid_in FAIL PASS PASS PASS PASS FAIL FAIL
64-bit -Inf

Data: fbfff0000000000000

Tags: dag-cbor, c42

Description: negative infinity is invalid in dag-cbor

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
NaN

Data: f97e00

Tags: dag-cbor, c42

Description: NaN should not be encoded for dag-cbor

invalid_out FAIL PASS PASS PASS PASS FAIL PASS
Inf

Data: f97c00

Tags: dag-cbor, c42

Description: infinity should not be encoded for dag-cbor

invalid_out FAIL PASS PASS PASS PASS FAIL PASS
-Inf

Data: f9fc00

Tags: dag-cbor, c42

Description: negative infinity should not be encoded for dag-cbor

invalid_out FAIL PASS PASS PASS PASS FAIL PASS
NaN with payload

Data: f97e01

Tags: CBOR-Core

Description: NaNs with payloads (set bits) are invalid in CBOR::Core

invalid_in FAIL PASS PASS PASS PASS FAIL PASS
signaling NaN

Data: f97d00

Tags: dag-cbor, c42

Description: signaling NaNs are invalid in dag-cbor (like other NaNs)

invalid_in FAIL PASS PASS PASS PASS FAIL PASS

๐Ÿ”— indefinite.json

Description Type go-ipld-prime js-dag-cbor atcute dag-cbrrr python-libipld go-ipld-cbor serde_ipld_dagcbor
indefinite map

Data: bfff

Tags: rfc8949, dag-cbor, c42

Description: maps with undefined length are banned

invalid_in FAIL PASS PASS PASS PASS FAIL PASS
indefinite array

Data: 9fff

Tags: rfc8949, dag-cbor, c42

Description: arrays with undefined length are banned

invalid_in FAIL PASS PASS PASS PASS FAIL PASS
indefinite byte string

Data: 5fff

Tags: rfc8949, dag-cbor, c42

Description: byte strings with undefined length are banned

invalid_in FAIL PASS PASS PASS PASS FAIL PASS
indefinite string

Data: 7fff

Tags: rfc8949, dag-cbor, c42

Description: strings with undefined length are banned

invalid_in FAIL PASS PASS PASS PASS FAIL PASS

๐Ÿ”— integer_range.json

Description Type go-ipld-prime js-dag-cbor atcute dag-cbrrr python-libipld go-ipld-cbor serde_ipld_dagcbor
largest CBOR integer, 2^64-1

Data: 1bffffffffffffffff

Tags: basic

Description: the largest possible value for CBOR's positive integer type

roundtrip PASS PASS FAIL PASS PASS FAIL PASS
smallest CBOR integer, -(2^64)

Data: 3bffffffffffffffff

Tags: basic

Description: the smallest possible value for CBOR's negative integer type

roundtrip FAIL PASS FAIL PASS PASS FAIL PASS
max safe JS integer, 2^53-1

Data: 1b001fffffffffffff

Tags: basic

Description: the largest integer considered safe for use in JavaScript

roundtrip PASS PASS PASS PASS PASS PASS PASS
2^53+1, unrepresentable in JS

Data: 1b0020000000000001

Tags: basic

Description: an integer that can't be represented in JavaScript (without BigInt)

roundtrip PASS PASS FAIL PASS PASS PASS PASS
min safe JS integer, -(2^53-1)

Data: 3b001ffffffffffffe

Tags: basic

Description: the smallest integer considered safe for use in JavaScript

roundtrip PASS PASS PASS PASS PASS PASS PASS
-(2^53+1), unrepresentable in JS

Data: 3b0020000000000000

Tags: basic

Description: a negative integer that can't be represented in JavaScript (without BigInt)

roundtrip PASS PASS FAIL PASS PASS PASS PASS
smallest unsigned bigint

Data: c249010000000000000000

Tags: CBOR-Core, c42

Description: the smallest positive CBOR big integer value, valid in specs that support big integers

roundtrip FAIL FAIL FAIL FAIL FAIL FAIL FAIL
highest negative bigint

Data: c349010000000000000000

Tags: CBOR-Core, c42

Description: the largest negative CBOR big integer value, valid in specs that support big integers

roundtrip FAIL FAIL FAIL FAIL FAIL FAIL FAIL
bignum

Data: c249010000000000000000

Tags: dag-cbor

Description: big integers are banned for encoding by dag-cbor

invalid_out PASS PASS PASS PASS PASS PASS FAIL
bignum

Data: c249010000000000000000

Tags: dag-cbor

Description: big integers are banned for decoding by dag-cbor

invalid_in PASS PASS PASS PASS PASS PASS PASS
bignum with small value

Data: c24101

Tags: dag-cbor, rfc8949

Description: an bignum with a value in the valid range is still banned in dag-cbor, and improper in RFC 8949 preferred serialization

invalid_in PASS PASS PASS PASS PASS PASS PASS

๐Ÿ”— map_keys.json

Description Type go-ipld-prime js-dag-cbor atcute dag-cbrrr python-libipld go-ipld-cbor serde_ipld_dagcbor
map with string key

Data: a1616100

Tags: basic

Description: a simple map valid by any spec

roundtrip PASS PASS PASS PASS PASS PASS PASS
map with int key

Data: a10000

Tags: dag-cbor, c42

Description: a map with an integer key, invalid to decode dag-cbor

invalid_in PASS PASS PASS PASS PASS PASS FAIL
map with int key

Data: a10000

Tags: dag-cbor, c42

Description: a map with an integer key, invalid to encode dag-cbor

invalid_out PASS FAIL PASS PASS PASS PASS FAIL
map keys in correct order

Data: a361610161620262616103

Tags: rfc8949, dag-cbor, c42

Description: a map with string keys, sorted by their bytes, which also sorts them by length in CBOR

roundtrip PASS PASS PASS PASS PASS PASS PASS
map keys in incorrect order

Data: a2616201616100

Tags: rfc8949, dag-cbor, c42

Description: a map with string keys, not sorted by bytes/length

invalid_in FAIL FAIL FAIL PASS PASS FAIL FAIL
duplicate map keys

Data: a2616100616101

Tags: basic, dag-cbor, c42, dCBOR

Description: a map with duplicate string keys which is invalid by the CBOR spec

invalid_in PASS PASS FAIL PASS PASS PASS PASS

๐Ÿ”— numeric_reduction.json

Description Type go-ipld-prime js-dag-cbor atcute dag-cbrrr python-libipld go-ipld-cbor serde_ipld_dagcbor
0.0 could be reduced

Data: f90000

Tags: dCBOR

Description: 0.0 could be reduced to an integer according to dCBOR

invalid_in FAIL FAIL PASS PASS PASS FAIL PASS
-0.0 could be reduced

Data: f98000

Tags: dCBOR

Description: -0.0 could be reduced to integer zero according to dCBOR

invalid_in FAIL FAIL PASS PASS PASS FAIL PASS
map with equal int and float keys

Data: a20a00f9490000

Tags: dCBOR, CBOR-Core

Description: a map with integer and float keys that have equal value, and so the float should not be reduced to an integer

roundtrip FAIL FAIL FAIL FAIL FAIL FAIL FAIL
too small for int reduction, <-(2^63)

Data: fbc3e0000000000001

Tags: dCBOR

Description: a floating point value too small to be stored in a CBOR integer should not be reduced according to dCBOR

roundtrip PASS PASS FAIL PASS PASS PASS PASS

๐Ÿ”— recursion.json

Description Type go-ipld-prime js-dag-cbor atcute dag-cbrrr python-libipld go-ipld-cbor serde_ipld_dagcbor
deeply nested object

Data: a260818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818180652474797065726170702e62736b792e666565642e70736f74

Tags: basic

Description: this CBOR object has many nested arrays which can trigger recursion depth issues for some parsers

roundtrip PASS FAIL PASS PASS FAIL PASS FAIL

๐Ÿ”— short_form.json

Description Type go-ipld-prime js-dag-cbor atcute dag-cbrrr python-libipld go-ipld-cbor serde_ipld_dagcbor
one item map

Data: a1616100

Tags: rfc8949, dag-cbor, c42

Description: a valid, minimally encoded map with one item

roundtrip PASS PASS PASS PASS PASS PASS PASS
unnecessary one-byte map definition

Data: b801616100

Tags: rfc8949, dag-cbor, c42

Description: a map with a length needlessly encoded as separate byte

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary two-byte map definition

Data: b90001616100

Tags: rfc8949, dag-cbor, c42

Description: a map with a length needlessly encoded as two bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary four-byte map definition

Data: ba00000001616100

Tags: rfc8949, dag-cbor, c42

Description: a map with a length needlessly encoded as four bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary eight-byte map definition

Data: bb0000000000000001616100

Tags: rfc8949, dag-cbor, c42

Description: a map with a length needlessly encoded as eight bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
small unsigned integer

Data: 01

Tags: rfc8949, dag-cbor, c42

Description: a valid, minimally encoded unsigned integer

roundtrip PASS PASS PASS PASS PASS PASS PASS
unnecessary one-byte unsigned integer

Data: 1801

Tags: rfc8949, dag-cbor, c42

Description: an unsigned integer with a length needlessly encoded as separate byte

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary two-byte unsigned integer

Data: 190001

Tags: rfc8949, dag-cbor, c42

Description: an unsigned integer with a length needlessly encoded as two bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary four-byte unsigned integer

Data: 1a00000001

Tags: rfc8949, dag-cbor, c42

Description: an unsigned integer with a length needlessly encoded as four bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary eight-byte unsigned integer

Data: 1b0000000000000001

Tags: rfc8949, dag-cbor, c42

Description: an unsigned integer with a length needlessly encoded as eight bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
small negative integer

Data: 20

Tags: rfc8949, dag-cbor, c42

Description: a valid, minimally encoded negative integer

roundtrip PASS PASS PASS PASS PASS PASS PASS
unnecessary one-byte negative integer

Data: 3800

Tags: rfc8949, dag-cbor, c42

Description: a negative integer with a length needlessly encoded as separate byte

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary two-byte negative integer

Data: 390000

Tags: rfc8949, dag-cbor, c42

Description: a negative integer with a length needlessly encoded as two bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary four-byte negative integer

Data: 3a00000000

Tags: rfc8949, dag-cbor, c42

Description: a negative integer with a length needlessly encoded as four bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary eight-byte negative integer

Data: 3b0000000000000000

Tags: rfc8949, dag-cbor, c42

Description: a negative integer with a length needlessly encoded as eight bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
empty byte string

Data: 40

Tags: rfc8949, dag-cbor, c42

Description: a valid, minimally encoded empty byte string

roundtrip PASS PASS PASS PASS PASS PASS PASS
unnecessary one-byte byte string

Data: 5800

Tags: rfc8949, dag-cbor, c42

Description: a byte string with a length needlessly encoded as separate byte

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary two-byte byte string

Data: 590000

Tags: rfc8949, dag-cbor, c42

Description: a byte string with a length needlessly encoded as two bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary four-byte byte string

Data: 5a00000000

Tags: rfc8949, dag-cbor, c42

Description: a byte string with a length needlessly encoded as four bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary eight-byte byte string

Data: 5b0000000000000000

Tags: rfc8949, dag-cbor, c42

Description: a byte string with a length needlessly encoded as eight bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
empty string

Data: 60

Tags: rfc8949, dag-cbor, c42

Description: a valid, minimally encoded empty string

roundtrip PASS PASS PASS PASS PASS PASS PASS
unnecessary one-byte string

Data: 7800

Tags: rfc8949, dag-cbor, c42

Description: a string with a length needlessly encoded as separate byte

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary two-byte string

Data: 790000

Tags: rfc8949, dag-cbor, c42

Description: a string with a length needlessly encoded as two bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary four-byte string

Data: 7a00000000

Tags: rfc8949, dag-cbor, c42

Description: a string with a length needlessly encoded as four bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary eight-byte string

Data: 7b0000000000000000

Tags: rfc8949, dag-cbor, c42

Description: a string with a length needlessly encoded as eight bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
empty array

Data: 80

Tags: rfc8949, dag-cbor, c42

Description: a valid, minimally encoded empty map

roundtrip PASS PASS PASS PASS PASS PASS PASS
unnecessary one-byte array

Data: 9800

Tags: rfc8949, dag-cbor, c42

Description: an array with a length needlessly encoded as separate byte

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary two-byte array

Data: 990000

Tags: rfc8949, dag-cbor, c42

Description: an array with a length needlessly encoded as two bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary four-byte array

Data: 9a00000000

Tags: rfc8949, dag-cbor, c42

Description: an array with a length needlessly encoded as four bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary eight-byte array

Data: 9b0000000000000000

Tags: rfc8949, dag-cbor, c42

Description: an array with a length needlessly encoded as eight bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
bigint with leading zero bytes

Data: c34a00010000000000000000

Tags: rfc8949, c42

Description: a big integer encoded with unnecessary leading zeros

invalid_in PASS PASS PASS PASS PASS PASS PASS
value too small for bigint

Data: c243010000

Tags: c42

Description: a big integer encoded with a value that could be a regular integer instead

invalid_in PASS PASS PASS PASS PASS PASS PASS

๐Ÿ”— simple.json

Description Type go-ipld-prime js-dag-cbor atcute dag-cbrrr python-libipld go-ipld-cbor serde_ipld_dagcbor
simple value 'undefined'

Data: f7

Tags: dag-cbor, c42, dCBOR

Description: the CBOR value undefined is banned for decoding by some specs

invalid_in FAIL FAIL PASS PASS PASS FAIL PASS
simple value 'undefined'

Data: f7

Tags: dag-cbor, c42, dCBOR

Description: the CBOR value undefined is banned for encoding by some specs

invalid_out FAIL PASS PASS PASS PASS FAIL FAIL
unassigned simple value

Data: e0

Tags: basic

Description: this simple value is unassigned by the spec and must be invalid

invalid_in PASS PASS PASS PASS PASS PASS PASS
simple value 'null'

Data: f6

Tags: basic

Description: the null value should be supported by all implementations

roundtrip PASS PASS PASS PASS PASS PASS PASS

๐Ÿ”— tags.json

Description Type go-ipld-prime js-dag-cbor atcute dag-cbrrr python-libipld go-ipld-cbor serde_ipld_dagcbor
tag that isn't 42

Data: d8207368747470733a2f2f6578616d706c652e636f6d

Tags: dag-cbor, c42

Description: all tags other than 42 (CID) are banned by dag-cbor

invalid_in FAIL PASS PASS PASS PASS PASS PASS
tagged object (datetime)

Data: c07819323032352d30352d32365431363a31383a31372d30343a3030

Tags: dag-cbor, c42

Description: an object that could be encoded as a CBOR tag (a datetime in this case) should be rejected by dag-cbor encoders

invalid_out FAIL PASS PASS PASS PASS PASS FAIL

๐Ÿ”— utf8.json

Description Type go-ipld-prime js-dag-cbor atcute dag-cbrrr python-libipld go-ipld-cbor serde_ipld_dagcbor
complex UTF-8 string

Data: 7873d8a7d984d986d8b561f09f94a5f09f918bf09f8fbc5acda7cc91cc93cca4cd9461cc88cc88cc87cd96ccad6ccdaecc92cdab67cc8ccc9acc97cd9a6fcc94cdaecc87cd90cc87cc99f09fa79fe2808de29980efb88fe2808d20f09f8fb3efb88fe2808de29aa7efb88fe794b0e2808b20e2808b

Tags: basic

Description: this string contains many different kinds of Unicode characters (English, Arabic, Chinese, emoji, etc) to ensure that implementations don't alter data or struggle with this

roundtrip PASS PASS PASS PASS PASS PASS PASS
commonly escaped characters

Data: 630d0a09

Tags: basic

Description: commonly escaped characters like newlines or tabs are not escaped in CBOR

roundtrip PASS PASS PASS PASS PASS PASS PASS
invalid UTF-8

Data: 62c328

Tags: basic

Description: CBOR strings are required to be valid UTF-8, this invalid string tests whether libraries check for this

invalid_in FAIL FAIL FAIL PASS PASS FAIL PASS
text not in Unicode Normalization Form C

Data: 6365cc81

Tags: dCBOR

Description: dCBOR requires strings be normalized into NFC form

invalid_in FAIL FAIL FAIL FAIL FAIL FAIL FAIL
text not in Unicode Normalization Form C

Data: 6365cc81

Tags: dag-cbor, CDE, CBOR-Core, c42

Description: all specs except dCBOR don't mention Unicode normalization, so this test ensures that libraries don't alter strings for the purpose of normalization

roundtrip PASS PASS PASS PASS PASS PASS PASS

๐Ÿ”— basic

Description Type go-ipld-prime js-dag-cbor atcute dag-cbrrr python-libipld go-ipld-cbor serde_ipld_dagcbor
invalid CID

Data: d82a4100

File: cid.json

Description: this is tagged as a CID but is not valid, only containing a single zero byte

invalid_in PASS PASS FAIL FAIL PASS PASS PASS
invalid hash size

Data: d82a582400015512205891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be

File: cid.json

Description: a CIDv1 with a stated hash size of 32 bytes, but only 31 bytes provided

invalid_in PASS PASS FAIL FAIL PASS PASS PASS
empty CID

Data: d82a450001551200

File: cid.json

Description: a valid CIDv1 with no hash data (hash length of zero)

roundtrip PASS PASS PASS PASS PASS PASS PASS
64-bit subnormal number

Data: fb0000000000000001

File: floats.json

Description: subnormal numbers are reduced to zero in some floating point implementations, but should not be here

roundtrip PASS PASS PASS PASS PASS PASS PASS
largest CBOR integer, 2^64-1

Data: 1bffffffffffffffff

File: integer_range.json

Description: the largest possible value for CBOR's positive integer type

roundtrip PASS PASS FAIL PASS PASS FAIL PASS
smallest CBOR integer, -(2^64)

Data: 3bffffffffffffffff

File: integer_range.json

Description: the smallest possible value for CBOR's negative integer type

roundtrip FAIL PASS FAIL PASS PASS FAIL PASS
max safe JS integer, 2^53-1

Data: 1b001fffffffffffff

File: integer_range.json

Description: the largest integer considered safe for use in JavaScript

roundtrip PASS PASS PASS PASS PASS PASS PASS
2^53+1, unrepresentable in JS

Data: 1b0020000000000001

File: integer_range.json

Description: an integer that can't be represented in JavaScript (without BigInt)

roundtrip PASS PASS FAIL PASS PASS PASS PASS
min safe JS integer, -(2^53-1)

Data: 3b001ffffffffffffe

File: integer_range.json

Description: the smallest integer considered safe for use in JavaScript

roundtrip PASS PASS PASS PASS PASS PASS PASS
-(2^53+1), unrepresentable in JS

Data: 3b0020000000000000

File: integer_range.json

Description: a negative integer that can't be represented in JavaScript (without BigInt)

roundtrip PASS PASS FAIL PASS PASS PASS PASS
map with string key

Data: a1616100

File: map_keys.json

Description: a simple map valid by any spec

roundtrip PASS PASS PASS PASS PASS PASS PASS
duplicate map keys

Data: a2616100616101

File: map_keys.json

Description: a map with duplicate string keys which is invalid by the CBOR spec

invalid_in PASS PASS FAIL PASS PASS PASS PASS
deeply nested object

Data: a260818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818181818180652474797065726170702e62736b792e666565642e70736f74

File: recursion.json

Description: this CBOR object has many nested arrays which can trigger recursion depth issues for some parsers

roundtrip PASS FAIL PASS PASS FAIL PASS FAIL
unassigned simple value

Data: e0

File: simple.json

Description: this simple value is unassigned by the spec and must be invalid

invalid_in PASS PASS PASS PASS PASS PASS PASS
simple value 'null'

Data: f6

File: simple.json

Description: the null value should be supported by all implementations

roundtrip PASS PASS PASS PASS PASS PASS PASS
complex UTF-8 string

Data: 7873d8a7d984d986d8b561f09f94a5f09f918bf09f8fbc5acda7cc91cc93cca4cd9461cc88cc88cc87cd96ccad6ccdaecc92cdab67cc8ccc9acc97cd9a6fcc94cdaecc87cd90cc87cc99f09fa79fe2808de29980efb88fe2808d20f09f8fb3efb88fe2808de29aa7efb88fe794b0e2808b20e2808b

File: utf8.json

Description: this string contains many different kinds of Unicode characters (English, Arabic, Chinese, emoji, etc) to ensure that implementations don't alter data or struggle with this

roundtrip PASS PASS PASS PASS PASS PASS PASS
commonly escaped characters

Data: 630d0a09

File: utf8.json

Description: commonly escaped characters like newlines or tabs are not escaped in CBOR

roundtrip PASS PASS PASS PASS PASS PASS PASS
invalid UTF-8

Data: 62c328

File: utf8.json

Description: CBOR strings are required to be valid UTF-8, this invalid string tests whether libraries check for this

invalid_in FAIL FAIL FAIL PASS PASS FAIL PASS

๐Ÿ”— dag-cbor

Description Type go-ipld-prime js-dag-cbor atcute dag-cbrrr python-libipld go-ipld-cbor serde_ipld_dagcbor
long CID tag

Data: d9002a582500015512205891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03

File: cid.json

Description: a longer than necessary CBOR representation of the CID tag is used, which is invalid in dag-cbor

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
valid CID with short tag

Data: d82a582500015512205891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03

File: cid.json

Description: a valid CID (raw, SHA-256) using the correct short CBOR representation of the CID tag

roundtrip PASS PASS PASS PASS PASS PASS PASS
concatenated objects / CBOR sequence

Data: 0000

File: concat.json

Description: a CBOR sequence of two zeros, invalid in the DAG-CBOR spec

invalid_in PASS PASS PASS PASS PASS FAIL PASS
64-bit floats only

Data: fb3ff8000000000000

File: floats.json

Description: a 64-bit float, the only valid float representation for dag-cbor

roundtrip PASS PASS PASS PASS PASS PASS PASS
64-bit floats only

Data: f93e00

File: floats.json

Description: a 16-bit float, an invalid input for dag-cbor

invalid_in FAIL FAIL PASS PASS PASS FAIL PASS
long NaN

Data: fb7ff8000000000000

File: floats.json

Description: an invalid NaN representation, too long (RFC 8949) or because NaNs are invalid (dag-cbor)

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
negative zero float64

Data: fb8000000000000000

File: floats.json

Description: testing that negative zero can be roundtripped without becoming positive or an integer

roundtrip PASS FAIL FAIL PASS PASS PASS PASS
zero float64

Data: fb0000000000000000

File: floats.json

Description: a standard float like 0.0 shouldn't become an integer

roundtrip PASS FAIL FAIL PASS PASS PASS PASS
short NaN

Data: f97e00

File: floats.json

Description: even short representations of NaN are invalid for dag-cbor

invalid_in FAIL PASS PASS PASS PASS FAIL PASS
short Inf

Data: f97c00

File: floats.json

Description: infinity is invalid in dag-cbor

invalid_in FAIL PASS PASS PASS PASS FAIL PASS
32-bit Inf

Data: fa7f800000

File: floats.json

Description: infinity is invalid in dag-cbor

invalid_in FAIL PASS PASS PASS PASS FAIL FAIL
64-bit Inf

Data: fb7ff0000000000000

File: floats.json

Description: infinity is invalid in dag-cbor

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
short -Inf

Data: f9fc00

File: floats.json

Description: negative infinity is invalid in dag-cbor

invalid_in FAIL PASS PASS PASS PASS FAIL PASS
32-bit -Inf

Data: faff800000

File: floats.json

Description: negative infinity is invalid in dag-cbor

invalid_in FAIL PASS PASS PASS PASS FAIL FAIL
64-bit -Inf

Data: fbfff0000000000000

File: floats.json

Description: negative infinity is invalid in dag-cbor

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
NaN

Data: f97e00

File: floats.json

Description: NaN should not be encoded for dag-cbor

invalid_out FAIL PASS PASS PASS PASS FAIL PASS
Inf

Data: f97c00

File: floats.json

Description: infinity should not be encoded for dag-cbor

invalid_out FAIL PASS PASS PASS PASS FAIL PASS
-Inf

Data: f9fc00

File: floats.json

Description: negative infinity should not be encoded for dag-cbor

invalid_out FAIL PASS PASS PASS PASS FAIL PASS
signaling NaN

Data: f97d00

File: floats.json

Description: signaling NaNs are invalid in dag-cbor (like other NaNs)

invalid_in FAIL PASS PASS PASS PASS FAIL PASS
indefinite map

Data: bfff

File: indefinite.json

Description: maps with undefined length are banned

invalid_in FAIL PASS PASS PASS PASS FAIL PASS
indefinite array

Data: 9fff

File: indefinite.json

Description: arrays with undefined length are banned

invalid_in FAIL PASS PASS PASS PASS FAIL PASS
indefinite byte string

Data: 5fff

File: indefinite.json

Description: byte strings with undefined length are banned

invalid_in FAIL PASS PASS PASS PASS FAIL PASS
indefinite string

Data: 7fff

File: indefinite.json

Description: strings with undefined length are banned

invalid_in FAIL PASS PASS PASS PASS FAIL PASS
bignum

Data: c249010000000000000000

File: integer_range.json

Description: big integers are banned for encoding by dag-cbor

invalid_out PASS PASS PASS PASS PASS PASS FAIL
bignum

Data: c249010000000000000000

File: integer_range.json

Description: big integers are banned for decoding by dag-cbor

invalid_in PASS PASS PASS PASS PASS PASS PASS
bignum with small value

Data: c24101

File: integer_range.json

Description: an bignum with a value in the valid range is still banned in dag-cbor, and improper in RFC 8949 preferred serialization

invalid_in PASS PASS PASS PASS PASS PASS PASS
map with int key

Data: a10000

File: map_keys.json

Description: a map with an integer key, invalid to decode dag-cbor

invalid_in PASS PASS PASS PASS PASS PASS FAIL
map with int key

Data: a10000

File: map_keys.json

Description: a map with an integer key, invalid to encode dag-cbor

invalid_out PASS FAIL PASS PASS PASS PASS FAIL
map keys in correct order

Data: a361610161620262616103

File: map_keys.json

Description: a map with string keys, sorted by their bytes, which also sorts them by length in CBOR

roundtrip PASS PASS PASS PASS PASS PASS PASS
map keys in incorrect order

Data: a2616201616100

File: map_keys.json

Description: a map with string keys, not sorted by bytes/length

invalid_in FAIL FAIL FAIL PASS PASS FAIL FAIL
duplicate map keys

Data: a2616100616101

File: map_keys.json

Description: a map with duplicate string keys which is invalid by the CBOR spec

invalid_in PASS PASS FAIL PASS PASS PASS PASS
one item map

Data: a1616100

File: short_form.json

Description: a valid, minimally encoded map with one item

roundtrip PASS PASS PASS PASS PASS PASS PASS
unnecessary one-byte map definition

Data: b801616100

File: short_form.json

Description: a map with a length needlessly encoded as separate byte

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary two-byte map definition

Data: b90001616100

File: short_form.json

Description: a map with a length needlessly encoded as two bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary four-byte map definition

Data: ba00000001616100

File: short_form.json

Description: a map with a length needlessly encoded as four bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary eight-byte map definition

Data: bb0000000000000001616100

File: short_form.json

Description: a map with a length needlessly encoded as eight bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
small unsigned integer

Data: 01

File: short_form.json

Description: a valid, minimally encoded unsigned integer

roundtrip PASS PASS PASS PASS PASS PASS PASS
unnecessary one-byte unsigned integer

Data: 1801

File: short_form.json

Description: an unsigned integer with a length needlessly encoded as separate byte

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary two-byte unsigned integer

Data: 190001

File: short_form.json

Description: an unsigned integer with a length needlessly encoded as two bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary four-byte unsigned integer

Data: 1a00000001

File: short_form.json

Description: an unsigned integer with a length needlessly encoded as four bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary eight-byte unsigned integer

Data: 1b0000000000000001

File: short_form.json

Description: an unsigned integer with a length needlessly encoded as eight bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
small negative integer

Data: 20

File: short_form.json

Description: a valid, minimally encoded negative integer

roundtrip PASS PASS PASS PASS PASS PASS PASS
unnecessary one-byte negative integer

Data: 3800

File: short_form.json

Description: a negative integer with a length needlessly encoded as separate byte

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary two-byte negative integer

Data: 390000

File: short_form.json

Description: a negative integer with a length needlessly encoded as two bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary four-byte negative integer

Data: 3a00000000

File: short_form.json

Description: a negative integer with a length needlessly encoded as four bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary eight-byte negative integer

Data: 3b0000000000000000

File: short_form.json

Description: a negative integer with a length needlessly encoded as eight bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
empty byte string

Data: 40

File: short_form.json

Description: a valid, minimally encoded empty byte string

roundtrip PASS PASS PASS PASS PASS PASS PASS
unnecessary one-byte byte string

Data: 5800

File: short_form.json

Description: a byte string with a length needlessly encoded as separate byte

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary two-byte byte string

Data: 590000

File: short_form.json

Description: a byte string with a length needlessly encoded as two bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary four-byte byte string

Data: 5a00000000

File: short_form.json

Description: a byte string with a length needlessly encoded as four bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary eight-byte byte string

Data: 5b0000000000000000

File: short_form.json

Description: a byte string with a length needlessly encoded as eight bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
empty string

Data: 60

File: short_form.json

Description: a valid, minimally encoded empty string

roundtrip PASS PASS PASS PASS PASS PASS PASS
unnecessary one-byte string

Data: 7800

File: short_form.json

Description: a string with a length needlessly encoded as separate byte

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary two-byte string

Data: 790000

File: short_form.json

Description: a string with a length needlessly encoded as two bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary four-byte string

Data: 7a00000000

File: short_form.json

Description: a string with a length needlessly encoded as four bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary eight-byte string

Data: 7b0000000000000000

File: short_form.json

Description: a string with a length needlessly encoded as eight bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
empty array

Data: 80

File: short_form.json

Description: a valid, minimally encoded empty map

roundtrip PASS PASS PASS PASS PASS PASS PASS
unnecessary one-byte array

Data: 9800

File: short_form.json

Description: an array with a length needlessly encoded as separate byte

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary two-byte array

Data: 990000

File: short_form.json

Description: an array with a length needlessly encoded as two bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary four-byte array

Data: 9a00000000

File: short_form.json

Description: an array with a length needlessly encoded as four bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary eight-byte array

Data: 9b0000000000000000

File: short_form.json

Description: an array with a length needlessly encoded as eight bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
simple value 'undefined'

Data: f7

File: simple.json

Description: the CBOR value undefined is banned for decoding by some specs

invalid_in FAIL FAIL PASS PASS PASS FAIL PASS
simple value 'undefined'

Data: f7

File: simple.json

Description: the CBOR value undefined is banned for encoding by some specs

invalid_out FAIL PASS PASS PASS PASS FAIL FAIL
tag that isn't 42

Data: d8207368747470733a2f2f6578616d706c652e636f6d

File: tags.json

Description: all tags other than 42 (CID) are banned by dag-cbor

invalid_in FAIL PASS PASS PASS PASS PASS PASS
tagged object (datetime)

Data: c07819323032352d30352d32365431363a31383a31372d30343a3030

File: tags.json

Description: an object that could be encoded as a CBOR tag (a datetime in this case) should be rejected by dag-cbor encoders

invalid_out FAIL PASS PASS PASS PASS PASS FAIL
text not in Unicode Normalization Form C

Data: 6365cc81

File: utf8.json

Description: all specs except dCBOR don't mention Unicode normalization, so this test ensures that libraries don't alter strings for the purpose of normalization

roundtrip PASS PASS PASS PASS PASS PASS PASS

๐Ÿ”— dasl-cid

Description Type go-ipld-prime js-dag-cbor atcute dag-cbrrr python-libipld go-ipld-cbor serde_ipld_dagcbor
valid CID with short tag

Data: d82a582500015512205891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03

File: cid.json

Description: a valid CID (raw, SHA-256) using the correct short CBOR representation of the CID tag

roundtrip PASS PASS PASS PASS PASS PASS PASS
CIDv0

Data: d82a582300122022ad631c69ee983095b5b8acd029ff94aff1dc6c48837878589a92b90dfea317

File: cid.json

Description: a valid CIDv0, which is invalid as a DASL CID

invalid_in FAIL FAIL FAIL FAIL FAIL FAIL FAIL
Big DASL CID

Data: d82a58250001551e208e4c7c1b99dbfd50e7a95185fead5ee1448fa904a2fdd778eaf5f2dbfd629a99

File: cid.json

Description: a valid BLAKE3 CID, also known as Big DASL

roundtrip PASS PASS PASS PASS PASS PASS PASS
empty CID

Data: d82a450001551200

File: cid.json

Description: a valid CIDv1 with no hash data (hash length of zero)

roundtrip PASS PASS PASS PASS PASS PASS PASS
CIDv1 that isn't raw or cbor

Data: d82a58250001701220e9822efc7c48027a5429fdbd988d02b2b8e4eaee8f62c32bd1021dcf922e05de

File: cid.json

Description: a valid CIDv1 that uses dag-pb, invalid in the DASL CID spec

invalid_in FAIL FAIL FAIL FAIL FAIL FAIL FAIL
disallowed hash type (SHA-1)

Data: d82a58190001551114f572d396fae9206628714fb2ce00f72e94f2258f

File: cid.json

Description: a valid CIDv1 that uses the SHA-1 hash, invalid in the DASL CID spec

invalid_in FAIL FAIL FAIL FAIL FAIL FAIL FAIL

๐Ÿ”— c42

Description Type go-ipld-prime js-dag-cbor atcute dag-cbrrr python-libipld go-ipld-cbor serde_ipld_dagcbor
valid CID with short tag

Data: d82a582500015512205891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03

File: cid.json

Description: a valid CID (raw, SHA-256) using the correct short CBOR representation of the CID tag

roundtrip PASS PASS PASS PASS PASS PASS PASS
64-bit floats only

Data: fb3ff8000000000000

File: floats.json

Description: a 64-bit float, the only valid float representation for dag-cbor

roundtrip PASS PASS PASS PASS PASS PASS PASS
64-bit floats only

Data: f93e00

File: floats.json

Description: a 16-bit float, an invalid input for dag-cbor

invalid_in FAIL FAIL PASS PASS PASS FAIL PASS
long NaN

Data: fb7ff8000000000000

File: floats.json

Description: an invalid NaN representation, too long (RFC 8949) or because NaNs are invalid (dag-cbor)

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
negative zero float64

Data: fb8000000000000000

File: floats.json

Description: testing that negative zero can be roundtripped without becoming positive or an integer

roundtrip PASS FAIL FAIL PASS PASS PASS PASS
zero float64

Data: fb0000000000000000

File: floats.json

Description: a standard float like 0.0 shouldn't become an integer

roundtrip PASS FAIL FAIL PASS PASS PASS PASS
short NaN

Data: f97e00

File: floats.json

Description: even short representations of NaN are invalid for dag-cbor

invalid_in FAIL PASS PASS PASS PASS FAIL PASS
short Inf

Data: f97c00

File: floats.json

Description: infinity is invalid in dag-cbor

invalid_in FAIL PASS PASS PASS PASS FAIL PASS
32-bit Inf

Data: fa7f800000

File: floats.json

Description: infinity is invalid in dag-cbor

invalid_in FAIL PASS PASS PASS PASS FAIL FAIL
64-bit Inf

Data: fb7ff0000000000000

File: floats.json

Description: infinity is invalid in dag-cbor

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
short -Inf

Data: f9fc00

File: floats.json

Description: negative infinity is invalid in dag-cbor

invalid_in FAIL PASS PASS PASS PASS FAIL PASS
32-bit -Inf

Data: faff800000

File: floats.json

Description: negative infinity is invalid in dag-cbor

invalid_in FAIL PASS PASS PASS PASS FAIL FAIL
64-bit -Inf

Data: fbfff0000000000000

File: floats.json

Description: negative infinity is invalid in dag-cbor

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
NaN

Data: f97e00

File: floats.json

Description: NaN should not be encoded for dag-cbor

invalid_out FAIL PASS PASS PASS PASS FAIL PASS
Inf

Data: f97c00

File: floats.json

Description: infinity should not be encoded for dag-cbor

invalid_out FAIL PASS PASS PASS PASS FAIL PASS
-Inf

Data: f9fc00

File: floats.json

Description: negative infinity should not be encoded for dag-cbor

invalid_out FAIL PASS PASS PASS PASS FAIL PASS
signaling NaN

Data: f97d00

File: floats.json

Description: signaling NaNs are invalid in dag-cbor (like other NaNs)

invalid_in FAIL PASS PASS PASS PASS FAIL PASS
indefinite map

Data: bfff

File: indefinite.json

Description: maps with undefined length are banned

invalid_in FAIL PASS PASS PASS PASS FAIL PASS
indefinite array

Data: 9fff

File: indefinite.json

Description: arrays with undefined length are banned

invalid_in FAIL PASS PASS PASS PASS FAIL PASS
indefinite byte string

Data: 5fff

File: indefinite.json

Description: byte strings with undefined length are banned

invalid_in FAIL PASS PASS PASS PASS FAIL PASS
indefinite string

Data: 7fff

File: indefinite.json

Description: strings with undefined length are banned

invalid_in FAIL PASS PASS PASS PASS FAIL PASS
smallest unsigned bigint

Data: c249010000000000000000

File: integer_range.json

Description: the smallest positive CBOR big integer value, valid in specs that support big integers

roundtrip FAIL FAIL FAIL FAIL FAIL FAIL FAIL
highest negative bigint

Data: c349010000000000000000

File: integer_range.json

Description: the largest negative CBOR big integer value, valid in specs that support big integers

roundtrip FAIL FAIL FAIL FAIL FAIL FAIL FAIL
map with int key

Data: a10000

File: map_keys.json

Description: a map with an integer key, invalid to decode dag-cbor

invalid_in PASS PASS PASS PASS PASS PASS FAIL
map with int key

Data: a10000

File: map_keys.json

Description: a map with an integer key, invalid to encode dag-cbor

invalid_out PASS FAIL PASS PASS PASS PASS FAIL
map keys in correct order

Data: a361610161620262616103

File: map_keys.json

Description: a map with string keys, sorted by their bytes, which also sorts them by length in CBOR

roundtrip PASS PASS PASS PASS PASS PASS PASS
map keys in incorrect order

Data: a2616201616100

File: map_keys.json

Description: a map with string keys, not sorted by bytes/length

invalid_in FAIL FAIL FAIL PASS PASS FAIL FAIL
duplicate map keys

Data: a2616100616101

File: map_keys.json

Description: a map with duplicate string keys which is invalid by the CBOR spec

invalid_in PASS PASS FAIL PASS PASS PASS PASS
one item map

Data: a1616100

File: short_form.json

Description: a valid, minimally encoded map with one item

roundtrip PASS PASS PASS PASS PASS PASS PASS
unnecessary one-byte map definition

Data: b801616100

File: short_form.json

Description: a map with a length needlessly encoded as separate byte

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary two-byte map definition

Data: b90001616100

File: short_form.json

Description: a map with a length needlessly encoded as two bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary four-byte map definition

Data: ba00000001616100

File: short_form.json

Description: a map with a length needlessly encoded as four bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary eight-byte map definition

Data: bb0000000000000001616100

File: short_form.json

Description: a map with a length needlessly encoded as eight bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
small unsigned integer

Data: 01

File: short_form.json

Description: a valid, minimally encoded unsigned integer

roundtrip PASS PASS PASS PASS PASS PASS PASS
unnecessary one-byte unsigned integer

Data: 1801

File: short_form.json

Description: an unsigned integer with a length needlessly encoded as separate byte

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary two-byte unsigned integer

Data: 190001

File: short_form.json

Description: an unsigned integer with a length needlessly encoded as two bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary four-byte unsigned integer

Data: 1a00000001

File: short_form.json

Description: an unsigned integer with a length needlessly encoded as four bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary eight-byte unsigned integer

Data: 1b0000000000000001

File: short_form.json

Description: an unsigned integer with a length needlessly encoded as eight bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
small negative integer

Data: 20

File: short_form.json

Description: a valid, minimally encoded negative integer

roundtrip PASS PASS PASS PASS PASS PASS PASS
unnecessary one-byte negative integer

Data: 3800

File: short_form.json

Description: a negative integer with a length needlessly encoded as separate byte

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary two-byte negative integer

Data: 390000

File: short_form.json

Description: a negative integer with a length needlessly encoded as two bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary four-byte negative integer

Data: 3a00000000

File: short_form.json

Description: a negative integer with a length needlessly encoded as four bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary eight-byte negative integer

Data: 3b0000000000000000

File: short_form.json

Description: a negative integer with a length needlessly encoded as eight bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
empty byte string

Data: 40

File: short_form.json

Description: a valid, minimally encoded empty byte string

roundtrip PASS PASS PASS PASS PASS PASS PASS
unnecessary one-byte byte string

Data: 5800

File: short_form.json

Description: a byte string with a length needlessly encoded as separate byte

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary two-byte byte string

Data: 590000

File: short_form.json

Description: a byte string with a length needlessly encoded as two bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary four-byte byte string

Data: 5a00000000

File: short_form.json

Description: a byte string with a length needlessly encoded as four bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary eight-byte byte string

Data: 5b0000000000000000

File: short_form.json

Description: a byte string with a length needlessly encoded as eight bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
empty string

Data: 60

File: short_form.json

Description: a valid, minimally encoded empty string

roundtrip PASS PASS PASS PASS PASS PASS PASS
unnecessary one-byte string

Data: 7800

File: short_form.json

Description: a string with a length needlessly encoded as separate byte

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary two-byte string

Data: 790000

File: short_form.json

Description: a string with a length needlessly encoded as two bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary four-byte string

Data: 7a00000000

File: short_form.json

Description: a string with a length needlessly encoded as four bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary eight-byte string

Data: 7b0000000000000000

File: short_form.json

Description: a string with a length needlessly encoded as eight bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
empty array

Data: 80

File: short_form.json

Description: a valid, minimally encoded empty map

roundtrip PASS PASS PASS PASS PASS PASS PASS
unnecessary one-byte array

Data: 9800

File: short_form.json

Description: an array with a length needlessly encoded as separate byte

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary two-byte array

Data: 990000

File: short_form.json

Description: an array with a length needlessly encoded as two bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary four-byte array

Data: 9a00000000

File: short_form.json

Description: an array with a length needlessly encoded as four bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary eight-byte array

Data: 9b0000000000000000

File: short_form.json

Description: an array with a length needlessly encoded as eight bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
bigint with leading zero bytes

Data: c34a00010000000000000000

File: short_form.json

Description: a big integer encoded with unnecessary leading zeros

invalid_in PASS PASS PASS PASS PASS PASS PASS
value too small for bigint

Data: c243010000

File: short_form.json

Description: a big integer encoded with a value that could be a regular integer instead

invalid_in PASS PASS PASS PASS PASS PASS PASS
simple value 'undefined'

Data: f7

File: simple.json

Description: the CBOR value undefined is banned for decoding by some specs

invalid_in FAIL FAIL PASS PASS PASS FAIL PASS
simple value 'undefined'

Data: f7

File: simple.json

Description: the CBOR value undefined is banned for encoding by some specs

invalid_out FAIL PASS PASS PASS PASS FAIL FAIL
tag that isn't 42

Data: d8207368747470733a2f2f6578616d706c652e636f6d

File: tags.json

Description: all tags other than 42 (CID) are banned by dag-cbor

invalid_in FAIL PASS PASS PASS PASS PASS PASS
tagged object (datetime)

Data: c07819323032352d30352d32365431363a31383a31372d30343a3030

File: tags.json

Description: an object that could be encoded as a CBOR tag (a datetime in this case) should be rejected by dag-cbor encoders

invalid_out FAIL PASS PASS PASS PASS PASS FAIL
text not in Unicode Normalization Form C

Data: 6365cc81

File: utf8.json

Description: all specs except dCBOR don't mention Unicode normalization, so this test ensures that libraries don't alter strings for the purpose of normalization

roundtrip PASS PASS PASS PASS PASS PASS PASS

๐Ÿ”— rfc8949

Description Type go-ipld-prime js-dag-cbor atcute dag-cbrrr python-libipld go-ipld-cbor serde_ipld_dagcbor
float reduction

Data: f93e00

File: floats.json

Description: a 16-bit float, a valid representation according to RFC 8949

roundtrip FAIL FAIL FAIL FAIL FAIL FAIL FAIL
float reduction

Data: fb3ff8000000000000

File: floats.json

Description: a 64-bit float that could be reduced, invalid for RFC 8949

invalid_in FAIL FAIL FAIL FAIL FAIL FAIL FAIL
short NaN

Data: f97e00

File: floats.json

Description: the only valid NaN representation for RFC 8949

roundtrip FAIL FAIL FAIL FAIL FAIL FAIL FAIL
long NaN

Data: fb7ff8000000000000

File: floats.json

Description: an invalid NaN representation, too long (RFC 8949) or because NaNs are invalid (dag-cbor)

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
zero float16

Data: f90000

File: floats.json

Description: 0.0 as a 16-bit float is valid and required for RFC 8949

roundtrip FAIL FAIL FAIL FAIL FAIL FAIL FAIL
indefinite map

Data: bfff

File: indefinite.json

Description: maps with undefined length are banned

invalid_in FAIL PASS PASS PASS PASS FAIL PASS
indefinite array

Data: 9fff

File: indefinite.json

Description: arrays with undefined length are banned

invalid_in FAIL PASS PASS PASS PASS FAIL PASS
indefinite byte string

Data: 5fff

File: indefinite.json

Description: byte strings with undefined length are banned

invalid_in FAIL PASS PASS PASS PASS FAIL PASS
indefinite string

Data: 7fff

File: indefinite.json

Description: strings with undefined length are banned

invalid_in FAIL PASS PASS PASS PASS FAIL PASS
bignum with small value

Data: c24101

File: integer_range.json

Description: an bignum with a value in the valid range is still banned in dag-cbor, and improper in RFC 8949 preferred serialization

invalid_in PASS PASS PASS PASS PASS PASS PASS
map keys in correct order

Data: a361610161620262616103

File: map_keys.json

Description: a map with string keys, sorted by their bytes, which also sorts them by length in CBOR

roundtrip PASS PASS PASS PASS PASS PASS PASS
map keys in incorrect order

Data: a2616201616100

File: map_keys.json

Description: a map with string keys, not sorted by bytes/length

invalid_in FAIL FAIL FAIL PASS PASS FAIL FAIL
one item map

Data: a1616100

File: short_form.json

Description: a valid, minimally encoded map with one item

roundtrip PASS PASS PASS PASS PASS PASS PASS
unnecessary one-byte map definition

Data: b801616100

File: short_form.json

Description: a map with a length needlessly encoded as separate byte

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary two-byte map definition

Data: b90001616100

File: short_form.json

Description: a map with a length needlessly encoded as two bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary four-byte map definition

Data: ba00000001616100

File: short_form.json

Description: a map with a length needlessly encoded as four bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary eight-byte map definition

Data: bb0000000000000001616100

File: short_form.json

Description: a map with a length needlessly encoded as eight bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
small unsigned integer

Data: 01

File: short_form.json

Description: a valid, minimally encoded unsigned integer

roundtrip PASS PASS PASS PASS PASS PASS PASS
unnecessary one-byte unsigned integer

Data: 1801

File: short_form.json

Description: an unsigned integer with a length needlessly encoded as separate byte

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary two-byte unsigned integer

Data: 190001

File: short_form.json

Description: an unsigned integer with a length needlessly encoded as two bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary four-byte unsigned integer

Data: 1a00000001

File: short_form.json

Description: an unsigned integer with a length needlessly encoded as four bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary eight-byte unsigned integer

Data: 1b0000000000000001

File: short_form.json

Description: an unsigned integer with a length needlessly encoded as eight bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
small negative integer

Data: 20

File: short_form.json

Description: a valid, minimally encoded negative integer

roundtrip PASS PASS PASS PASS PASS PASS PASS
unnecessary one-byte negative integer

Data: 3800

File: short_form.json

Description: a negative integer with a length needlessly encoded as separate byte

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary two-byte negative integer

Data: 390000

File: short_form.json

Description: a negative integer with a length needlessly encoded as two bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary four-byte negative integer

Data: 3a00000000

File: short_form.json

Description: a negative integer with a length needlessly encoded as four bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary eight-byte negative integer

Data: 3b0000000000000000

File: short_form.json

Description: a negative integer with a length needlessly encoded as eight bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
empty byte string

Data: 40

File: short_form.json

Description: a valid, minimally encoded empty byte string

roundtrip PASS PASS PASS PASS PASS PASS PASS
unnecessary one-byte byte string

Data: 5800

File: short_form.json

Description: a byte string with a length needlessly encoded as separate byte

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary two-byte byte string

Data: 590000

File: short_form.json

Description: a byte string with a length needlessly encoded as two bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary four-byte byte string

Data: 5a00000000

File: short_form.json

Description: a byte string with a length needlessly encoded as four bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary eight-byte byte string

Data: 5b0000000000000000

File: short_form.json

Description: a byte string with a length needlessly encoded as eight bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
empty string

Data: 60

File: short_form.json

Description: a valid, minimally encoded empty string

roundtrip PASS PASS PASS PASS PASS PASS PASS
unnecessary one-byte string

Data: 7800

File: short_form.json

Description: a string with a length needlessly encoded as separate byte

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary two-byte string

Data: 790000

File: short_form.json

Description: a string with a length needlessly encoded as two bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary four-byte string

Data: 7a00000000

File: short_form.json

Description: a string with a length needlessly encoded as four bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary eight-byte string

Data: 7b0000000000000000

File: short_form.json

Description: a string with a length needlessly encoded as eight bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
empty array

Data: 80

File: short_form.json

Description: a valid, minimally encoded empty map

roundtrip PASS PASS PASS PASS PASS PASS PASS
unnecessary one-byte array

Data: 9800

File: short_form.json

Description: an array with a length needlessly encoded as separate byte

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary two-byte array

Data: 990000

File: short_form.json

Description: an array with a length needlessly encoded as two bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary four-byte array

Data: 9a00000000

File: short_form.json

Description: an array with a length needlessly encoded as four bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
unnecessary eight-byte array

Data: 9b0000000000000000

File: short_form.json

Description: an array with a length needlessly encoded as eight bytes

invalid_in FAIL PASS FAIL PASS PASS FAIL FAIL
bigint with leading zero bytes

Data: c34a00010000000000000000

File: short_form.json

Description: a big integer encoded with unnecessary leading zeros

invalid_in PASS PASS PASS PASS PASS PASS PASS

๐Ÿ”— CBOR-Core

Description Type go-ipld-prime js-dag-cbor atcute dag-cbrrr python-libipld go-ipld-cbor serde_ipld_dagcbor
short NaN

Data: f97e00

File: floats.json

Description: the only valid NaN representation for RFC 8949

roundtrip FAIL FAIL FAIL FAIL FAIL FAIL FAIL
zero float16

Data: f90000

File: floats.json

Description: 0.0 as a 16-bit float is valid and required for RFC 8949

roundtrip FAIL FAIL FAIL FAIL FAIL FAIL FAIL
NaN with payload

Data: f97e01

File: floats.json

Description: NaNs with payloads (set bits) are invalid in CBOR::Core

invalid_in FAIL PASS PASS PASS PASS FAIL PASS
smallest unsigned bigint

Data: c249010000000000000000

File: integer_range.json

Description: the smallest positive CBOR big integer value, valid in specs that support big integers

roundtrip FAIL FAIL FAIL FAIL FAIL FAIL FAIL
highest negative bigint

Data: c349010000000000000000

File: integer_range.json

Description: the largest negative CBOR big integer value, valid in specs that support big integers

roundtrip FAIL FAIL FAIL FAIL FAIL FAIL FAIL
map with equal int and float keys

Data: a20a00f9490000

File: numeric_reduction.json

Description: a map with integer and float keys that have equal value, and so the float should not be reduced to an integer

roundtrip FAIL FAIL FAIL FAIL FAIL FAIL FAIL
text not in Unicode Normalization Form C

Data: 6365cc81

File: utf8.json

Description: all specs except dCBOR don't mention Unicode normalization, so this test ensures that libraries don't alter strings for the purpose of normalization

roundtrip PASS PASS PASS PASS PASS PASS PASS

๐Ÿ”— dCBOR

Description Type go-ipld-prime js-dag-cbor atcute dag-cbrrr python-libipld go-ipld-cbor serde_ipld_dagcbor
duplicate map keys

Data: a2616100616101

File: map_keys.json

Description: a map with duplicate string keys which is invalid by the CBOR spec

invalid_in PASS PASS FAIL PASS PASS PASS PASS
0.0 could be reduced

Data: f90000

File: numeric_reduction.json

Description: 0.0 could be reduced to an integer according to dCBOR

invalid_in FAIL FAIL PASS PASS PASS FAIL PASS
-0.0 could be reduced

Data: f98000

File: numeric_reduction.json

Description: -0.0 could be reduced to integer zero according to dCBOR

invalid_in FAIL FAIL PASS PASS PASS FAIL PASS
map with equal int and float keys

Data: a20a00f9490000

File: numeric_reduction.json

Description: a map with integer and float keys that have equal value, and so the float should not be reduced to an integer

roundtrip FAIL FAIL FAIL FAIL FAIL FAIL FAIL
too small for int reduction, <-(2^63)

Data: fbc3e0000000000001

File: numeric_reduction.json

Description: a floating point value too small to be stored in a CBOR integer should not be reduced according to dCBOR

roundtrip PASS PASS FAIL PASS PASS PASS PASS
simple value 'undefined'

Data: f7

File: simple.json

Description: the CBOR value undefined is banned for decoding by some specs

invalid_in FAIL FAIL PASS PASS PASS FAIL PASS
simple value 'undefined'

Data: f7

File: simple.json

Description: the CBOR value undefined is banned for encoding by some specs

invalid_out FAIL PASS PASS PASS PASS FAIL FAIL
text not in Unicode Normalization Form C

Data: 6365cc81

File: utf8.json

Description: dCBOR requires strings be normalized into NFC form

invalid_in FAIL FAIL FAIL FAIL FAIL FAIL FAIL

๐Ÿ”— CDE

Description Type go-ipld-prime js-dag-cbor atcute dag-cbrrr python-libipld go-ipld-cbor serde_ipld_dagcbor
text not in Unicode Normalization Form C

Data: 6365cc81

File: utf8.json

Description: all specs except dCBOR don't mention Unicode normalization, so this test ensures that libraries don't alter strings for the purpose of normalization

roundtrip PASS PASS PASS PASS PASS PASS PASS