Meta tags:
Headings (most frequently used words):
and, encoding, cbor, field, type, types, data, item, semantic, tag, contents, specification, of, the, examples, major, count, handling, in, each, registration, dag, cryptography, see, also, notes, references, external, links, integers, strings, arrays, maps, special, float, object, signing, encryption, web, tokens, tiny, short, long,
Text of the page (most frequently used words):
the (119), cbor (64), count (57), and (44), data (39), type (36), item (31), edit (25), byte (25), short (24), for (23), this (22), tag (21), field (20), bits (20), types (19), from (18), #encoding (17), not (16), payload (16), items (16), are (15), major (15), value (15), values (15), can (14), length (14), text (13), that (13), extended (13), representation (12), with (11), retrieved (11), object (11), string (11), encodes (11), which (11), variable (11), format (10), dag (10), indefinite (10), following (10), bit (10), used (10), may (9), all (9), 2025 (9), binary (9), web (9), rfc (8), original (8), archived (8), unsigned (8), required (8), break (8), but (8), other (8), number (8), strings (8), wikipedia (7), articles (7), serialization (7), also (7), specification (7), map (7), optional (7), semantic (7), special (7), marker (7), header (7), page (6), was (6), protocol (6), messagepack (6), bormann (6), bytes (6), defined (6), atomic (6), array (6), pairs (6), each (6), references (5), encryption (5), json (5), carsten (5), concise (5), one (5), have (5), has (5), point (5), must (5), counts (5), same (5), indicates (5), integers (5), toggle (4), contents (4), search (4), july (4), 2018 (4), 2020 (4), description (4), formats (4), token (4), sequence (4), links (4), signing (4), hoffman (4), paul (4), 8949 (4), information (4), content (4), single (4), tags (4), indicate (4), encode (4), encoded (4), structure (4), main (4), article (4), hide (4), move (4), sidebar (4), languages (3), view (3), contact (3), additional (3), you (3), non (3), use (3), failed (3), verification (3), list (3), atom (3), into (3), cose (3), 2022 (3), ietf (3), overview (3), pdf (3), name (3), see (3), tokens (3), help (3), adding (3), cryptography (3), objects (3), form (3), allows (3), its (3), different (3), example (3), more (3), url (3), internet (3), interpreted (3), floating (3), follows (3), 255 (3), size (3), file (3), arrays (3), there (3), followed (3), directly (3), handling (3), etc (3), sources (3), tools (3), table (2), about (2), privacy (2), policy (2), terms (2), 2026 (2), categories (2), expanded (2), lacking (2), reliable (2), april (2), wikidata (2), https (2), org (2), comparison (2), property (2), base64 (2), human (2), online (2), tool (2), convert (2), another (2), external (2), cwt (2), 2017 (2), 2024 (2), ipld (2), december (2), fido2 (2), project (2), 2016 (2), coap (2), application (2), 2013 (2), notes (2), uses (2), they (2), section (2), missing (2), needs (2), expansion (2), specifically (2), allow (2), uniquely (2), serialized (2), two (2), some (2), because (2), does (2), even (2), developed (2), than (2), first (2), standard (2), actions (2), semantics (2), template (2), range (2), iana (2), contain (2), registration (2), related (2), appear (2), reserved (2), like (2), big (2), endian (2), these (2), differently (2), case (2), decoding (2), currently (2), true (2), float (2), stream (2), corresponding (2), distinguish (2), what (2), until (2), nested (2), parser (2), maps (2), enclosed (2), permitted (2), utf (2), characters (2), long (2), tiny (2), consists (2), behaviour (2), examples (2), based (2), learn (2), appearance (2), upload (2), changes (2), history (2), read (2), subsection (2), log (2), create (2), account (2), donate (2), menu (2), add, topic, mobile, cookie, statement, statistics, developers, code, conduct, legal, safety, contacts, disclaimers, available, under, apply, using, site, agree, registered, trademark, profit, organization, wikimedia, foundation, inc, creative, commons, attribution, sharealike, license, rendered, parsoid, last, edited, september, utc, hidden, february, matches, category, index, php, title, oldid, 1375259767, yenc, uuencode, xdr, dsdl, cyphal, thrift, buffers, flatbuffers, cap, proto, ubjson, bson, bencode, base32, avro, smi, asn, ascii85, amf, yaml, xml, toon, toml, rebol, rdf, markdown, signature, edifact, csv, readable, exchange, hex, base64url, diagnostic, notation, zone, textual, back, jones, wahlstroem, erdtman, tschofenig, 8392, schaad, 8152, codec, docs, 2021, github, discussions, upcoming, spec, adds, fido, alliance, constrained, proceedings, design, named, after, despite, coincidentally, being, abbreviation, his, own, alternative, jwts, signed, structures, encrypted, authenticated, denotes, since, produced, merkle, dags, directed, acyclic, graph, consistent, piece, then, hashed, cid, usable, addressing, addressable, storage, means, serializations, picks, out, possible, representations, longer, their, nature, unique, though, stricter, subset, problem, solves, way, represented, either, labs, draft, 32768, 18446744073709551615, come, served, 32767, created, registry, located, registrations, outlined, below, www, assignments, xhtml, terminates, where, begins, sizes, particular, 0x1234, 0x00001234, exactly, equivalent, ieee, future, simplify, none, undefined, null, false, various, fit, rules, pseudo, ones, 0xffff, 0xffffffff, 0xffffffffffffffff, absence, library, should, never, 55799, allocated, mean, prepended, without, affecting, meaning, beginning, magic, provides, beyond, provide, defines, homogeneous, fixed, integer, 8746, 3986, uri, bignum, unix, time, considered, similar, called, dictionary, associative, key, before, alternatively, continues, pair, markers, many, need, programming, call, tuple, rather, zero, definite, terminated, concatenation, individually, well, formed, split, across, unstructured, positive, negative, vari, multi, network, order, unusual, always, divided, assigned, selecting, note, while, requires, spaces, omitted, only, octets, 797a, primitive, numeric, describes, seen, containing, inspired, promoted, sadayuki, furuhashi, particularly, allowing, implemented, amongst, recommended, layer, things, suite, messages, ctap, within, scope, client, authenticator, loosely, authored, transmission, manner, increases, processing, transfer, speeds, cost, readability, website, yes, open, interchange, media, filename, extension, how, when, remove, message, please, improve, jstor, scholar, books, newspapers, news, find, secondary, tertiary, relies, excessively, primary, enzyme, cellobiose, dehydrogenase, acceptor, free, encyclopedia, projects, printable, version, download, print, export, switch, legacy, get, shortened, cite, permanent, link, here, general, english, talk, 日本語, français, deutsch, català, top, personal, pages, recent, community, portal, contribute, random, current, events, navigation, jump,
Text of the page (random words):
ing in each data item toggle major type and count handling in each data item subsection 3 1 cbor data item field encoding 3 1 1 tiny field encoding 3 1 2 short field encoding 3 1 3 long field encoding 3 2 integers types 0 and 1 3 3 strings types 2 and 3 3 4 arrays and maps types 4 and 5 3 5 semantic tag type 6 3 6 special float type 7 4 semantic tag registration 5 dag cbor 6 cryptography toggle cryptography subsection 6 1 object signing and encryption 6 2 web tokens 7 see also 8 notes 9 references 10 external links toggle the table of contents cbor 4 languages català deutsch français 日本語 edit links article talk english read edit view history tools tools move to sidebar hide actions read edit view history general what links here related changes upload file permanent link page information cite this page get shortened url switch to legacy parser print export download as pdf printable version in other projects wikidata item appearance move to sidebar hide from wikipedia the free encyclopedia data serialization format for the enzyme see cellobiose dehydrogenase acceptor this article relies excessively on references to primary sources please improve this article by adding secondary or tertiary sources find sources cbor news newspapers books scholar jstor april 2020 learn how and when to remove this message cbor filename extension cbor internet media type application cbor type of format data interchange extended from messagepack standard rfc 8949 open format yes website cbor io concise binary object representation cbor is a binary data serialization format loosely based on json authored by carsten bormann and paul hoffman a like json it allows the transmission of data objects that contain name value pairs but in a more concise manner this increases processing and transfer speeds at the cost of human readability it is defined in ietf rfc 8949 2 amongst other uses it is the recommended data serialization layer for the coap internet of things protocol suite 3 failed verification and the data format on which cose messages are based it is also used in the client to authenticator protocol ctap within the scope of the fido2 project 4 cbor was inspired by messagepack which was developed and promoted by sadayuki furuhashi cbor extended messagepack particularly by allowing to distinguish text strings from byte strings which was implemented in 2013 in messagepack 5 6 specification of the cbor encoding edit cbor encoded data is seen as a stream of data items each data item consists of a header byte containing a 3 bit type and 5 bit short count this is followed by an optional extended count if the short count is in the range 24 27 and an optional payload for types 0 1 and 7 there is no payload the count is the value for types 2 byte string and 3 text string the count is the length of the payload for types 4 array and 5 map the count is the number of items pairs in the payload for type 6 tag the payload is a single item and the count is a numeric tag number which describes the enclosed item cbor data data item 1 data item 2 data item 3 byte count 1 byte cbor data item header variable variable 1 byte cbor data item header variable variable etc structure major type short count extended count optional data payload optional major type short count extended count optional data payload optional etc bit count 3 bits 5 bits 8 bits variable 8 bits variable 3 bits 5 bits 8 bits variable 8 bits variable etc examples edit x 1 yz true 2 w 82 array 2 a2 map 2 61 text 1 78 x 01 unsigned 1 62 text 2 797a yz f5 primitive 21 82 array 2 02 unsigned 2 61 text 1 77 w note while the json representation requires 27 characters the 5 spaces can be omitted the same data is encoded in only 13 octets of cbor major type and count handling in each data item edit each data item s behaviour is defined by the major type and count the major type is used for selecting the main behaviour or type of each data item the 5 bit short count field encodes counts 0 23 directly short counts of 24 27 indicate the count value is in a following 8 16 32 or 64 bit extended count field values 28 30 are not assigned and must not be used types are divided into atomic types 0 1 and 6 7 for which the count field encodes the value directly and non atomic types 2 5 for which the count field encodes the size of the following payload field a short count of 31 is used with non atomic types 2 5 to indicate an indefinite length the payload is the following items until a break marker byte of 255 type 7 short count 31 a short count of 31 is not permitted with the other atomic types 0 1 or 6 type 6 tag is unusual in that its count field encodes a value directly but also has a payload field which always consists of a single item extended counts and all multi byte values are encoded in network big endian byte order cbor data item field encoding edit tiny field encoding edit byte count 1 byte cbor data item header structure major type short count value bit count 3 bits 5 bits atom 0 1 7 0 23 break marker 7 31 short field encoding edit byte count 1 byte cbor data item header variable structure major type short count value bit count 3 bits 5 bits 8 bits variable atom 0 1 7 24 27 8 16 32 or 64 bits string 2 3 0 23 count 8 bits items 4 5 0 23 count items pairs tag 6 0 23 one item long field encoding edit byte count 1 byte cbor data item header 1 2 4 or 8 bytes variable structure major type short count 24 27 extended count length of payload value bit count 3 bits 5 bits 8 16 32 or 64 bits 8 bits vari string 2 3 24 27 up to 2 64 1 count 8 bits items 4 5 24 27 up to 2 64 1 count items pairs tag 6 24 27 tag up to 2 64 1 one item integers types 0 and 1 edit for integers the count field is the value there is no payload type 0 encodes positive or unsigned integers with values up to 2 64 1 type 1 encodes negative integers with a value of 1 count for values from 2 64 to 1 strings types 2 and 3 edit types 2 and 3 have a count field which encodes the length in bytes of the payload type 2 is an unstructured byte string type 3 is a utf 8 text string a short count of 31 indicates an indefinite length string this is followed by zero or more definite length strings of the same type terminated by a break marker byte the value of the item is the concatenation of the values of the enclosed items items of a different type or nested indefinite length strings are not permitted text strings must be individually well formed utf 8 characters may not be split across items arrays and maps types 4 and 5 edit type 4 has a count field encoding the number of following items followed by that many items the items need not all be the same type some programming languages call this a tuple rather than an array alternatively an indefinite length encoding with a short count of 31 may be used this continues until a break marker byte of 255 because nested items may also use the indefinite encoding the parser must pair the break markers with the corresponding indefinite length header bytes type 5 is similar but encodes a map also called a dictionary or associative array of key value pairs in this case the count encodes the number of pairs of items if the indefinite length encoding is used there must be an even number of items before the break marker byte semantic tag type 6 edit a semantic tag is another atomic type for which the count is the value but it also has a payload a single following item and the two are considered one item in e g an array or a map the tag number provides additional type information for the following item beyond what the 3 bit major type can provide for example a tag of 1 indicates that the following number is a unix time value a tag of 2 indicates that the following byte string encodes an unsigned bignum a tag of 32 indicates that the following text string is a uri as defined in rfc 3986 rfc 8746 defines tags 64 87 to encode homogeneous arrays of fixed size integer or floating point values as byte strings the tag 55799 is allocated to mean cbor data follows this is a semantic no op but allows the corresponding tag bytes d9 d9 f7 to be prepended to a cbor file without affecting its meaning these bytes may be used as a magic number to distinguish the beginning of cbor data the all ones tag values 0xffff 0xffffffff and 0xffffffffffffffff are reserved to indicate the absence of a tag in a cbor decoding library they should never appear in a data stream the break marker pseudo item may not be the payload of a tag special float type 7 edit this major type is used to encode various special values that do not fit into the other categories it follows the same encoding size rules as the other atomic types 0 1 and 6 but the count field is interpreted differently values 0 19 are not currently defined the values 20 23 are used to encode the special values false true null and undefined a short count of 24 indicates a 1 byte extended count follows which can be used in future to encode additional special values to simplify decoding the values 0 31 may not be encoded in this form none of the values 32 255 are currently defined short counts of 25 26 or 27 indicate a following extended count field is to be interpreted as a big endian 16 32 or 64 bit ieee floating point value these are the same sizes as an extended count but are interpreted differently in particular for all other major types a 2 byte extended count of 0x1234 and a 4 byte extended count of 0x00001234 are exactly equivalent this is not the case for floating point values short counts 28 30 are reserved like for all other major types a short count of 31 encodes the special break marker which terminates an indefinite length encoding this is related to but different from the use with other major types where a short count of 31 begins an indefinite length encoding this is not an item and may not appear in a defined length payload semantic tag registration edit iana has created the cbor tags registry located at https www iana org assignments cbor tags cbor tags xhtml registrations must contain the template outlined below 7 semantic tag type range template data item semantics short form point of contact description of semantics url standard actions 0 23 required required n a n a specification required 24 32767 24 2 15 1 required required n a n a first come first served 32768 18446744073709551615 2 15 2 64 1 required required required description is optional the url can point to an internet draft or a web page dag cbor edit the dag cbor specification is a stricter subset of cbor developed by protocol labs the problem that dag cbor solves is that in cbor an object can be serialized in more than one way for example b 1 a 2 can be represented as either a2 map 2 61 text 1 62 b 01 unsigned 1 61 text 1 61 a 02 unsigned 2 or a2 map 2 61 text 1 61 a 02 unsigned 2 61 text 1 62 b 01 unsigned 1 this means that one object can have two different serializations the dag cbor specification uniquely picks a single cbor representation out of all possible cbor representations of an object some objects that can have a cbor representation no longer has a dag cbor representation because their nature does not allow for a unique representation for example an indefinite length item can be a string byte sequence list and map does not have a dag cbor representation even though it can have a cbor representation 8 the dag cbor specification allows consistent content addressable storage specifically a piece of data can be uniquely serialized as a sequence of bytes and this sequence can then be hashed as its cid content id usable for content addressing the name dag denotes directed acyclic graph since the specification was produced specifically to allow for data objects in the form of merkle dags cryptography edit object signing and encryption edit this section needs expansion you can help by adding missing information july 2025 cbor object signing and encryption cose is a binary format for authenticated and or encrypted cbor data structures 9 web tokens edit this section needs expansion you can help by adding missing information july 2025 a cbor web token cwt is a signed token that uses cbor as the serialization format they are an alternative to json web tokens jwts 10 see also edit comparison of binary data serialization formats notes edit cbor is not named after bormann despite the format s name coincidentally being an abbreviation of his own 1 references edit bormann carsten hoffman paul 2013 07 28 cbor design and overview pdf ietf proceedings archived pdf from the original on 2025 01 28 retrieved 2024 06 01 bormann carsten cbor concise binary object representation overview cbor io archived from the original on 2025 01 28 retrieved 2016 08 24 coap constrained application protocol overview archived from the original on 2017 01 03 retrieved 2016 08 28 fido2 project fido alliance archived from the original on 2018 04 22 retrieved 2018 05 11 discussions on the upcoming messagepack spec that adds the string type to the protocol github archived from the original on 2022 01 04 retrieved 2022 01 04 bormann carsten hoffman paul e december 2020 rfc 8949 concise binary object representation cbor ietf archived from the original on 2025 01 28 retrieved 2021 12 26 bormann carsten hoffman paul e december 2020 rfc 8949 concise binary object representation cbor archived from the original on 2025 01 28 retrieved 2022 03 25 ipld codec docs dag cbor ipld io retrieved 2026 03 17 schaad j july 2017 rfc 8152 cbor object signing and encryption cose archived from the original on 2024 11 16 retrieved 2025 07 04 jones m wahlstroem e erdtman s tschofenig h may 2018 rfc 8392 cbor web token cwt retrieved 2025 07 04 external links edit online tool to convert from cbor binary to textual representation and back cbor zone online tool to convert a cbor item or a cbor sequence in the format of hex base64 base64url or cbor diagnostic notation into another format v t e data exchange formats human readable csv edifact json web encryption web token web signature markdown property list rdf rebol toml toon xml atom yaml binary amf ascii85 asn 1 smi avro base32 base64 bencode bson ubjson cap n proto cbor flatbuffers messagepack property list protocol buffers thrift cyphal dsdl xdr uuencode yenc comparison of data serialization formats retrieved from https en wikipedia org w index php title cbor oldid 1375259767 category data serialization formats hidden categories articles with short description short description matches wikidata articles lacking reliable references from april 2020 all articles lacking reliable references all articles with failed verification articles with failed verification from february 2018 articles to be expanded from july 2025 all articles to be expanded this page was last edited on 16 september 2026 at 19 24 utc page was rendered with parsoid text is available under the creative commons attribution sharealike 4 0 license additional terms may apply by using this site you agree to the terms of use and privacy policy wikipedia i...
|