Questions tagged [cbor]

The Concise Binary Object Representation (CBOR) is a data format specified by RFC 8949.

CBOR was originally specified in RFC 7049: Concise Binary Object Representation (CBOR). That RFC has since been obsoleted by RFC 8949: Concise Binary Object Representation (CBOR), which describes CBOR thus:

The Concise Binary Object Representation (CBOR) is a data format whose design goals include the possibility of extremely small code size, fairly small message size, and extensibility without the need for version negotiation. These design goals make it different from earlier binary serializations such as ASN.1 and MessagePack.

96 questions
14
votes
3 answers

Flatbuffers vs CBOR

Please help to suggest some merits and demerits of Flatbuffers and CBOR protocols. Both these binary formats claim to be good on their websites, but I am not able to make some good differences between the two. Flatbuffers: Advantage: Strict typing…
11
votes
3 answers

How do I deserialize into trait, not a concrete type?

I'm trying to do struct serialization, in which the bytes would eventually be sent down a pipe, reconstructed and methods be called on them. I created a trait these structs would implement as appropriate and I'm using serde and serde-cbor for…
Dash83
  • 1,357
  • 2
  • 17
  • 31
6
votes
1 answer

Webpack 5+Process is not defined triggered by stream-browserify

I have to decode a CBOR encoded array using the cbor node module. When i launch my command: const decodedData = base45.decode(greenpassBody); const output = pako.inflate(decodedData); const results = cbor.decodeAllSync(output); // this line this…
5
votes
3 answers

How can I display a CBOR Web Token encoded token in a legible manner?

I am trying to make the content of the QR code from the corona vaccination legible. Found the following page. I just don't quite understand how I can read the scanned string. Link / Certification API String:…
BogoBogo
  • 171
  • 2
  • 6
5
votes
2 answers

Serialize fixed size Map to CBOR

I have the following JSON: [ { 2: { "c": true } }, { 3: { "p": 10 } } ] That I would like to convert to CBOR format. Accordingly to cbor.me I have the following output: 82A102A16163F5A103A161700A But, when…
Bibu
  • 1,249
  • 2
  • 17
  • 40
5
votes
4 answers

Any .NET implementation of Concise Binary Object Representation(CBOR)?

I'm on the look-out for any implementations of this new binary data representation.
redcalx
  • 8,177
  • 4
  • 56
  • 105
4
votes
1 answer

From base64-encoded public key in DER format to COSE key, in Python

I have a base64-encoded public key in DER format. In Python, how can I convert it into a COSE key? Here is my failed attempt: from base64 import b64decode from cose.keys import CoseKey pubkeyder = "...==" decCborData.key =…
Bob
  • 1,713
  • 10
  • 23
4
votes
1 answer

Can not write a field name, expecting a value

When we switched from Jackson version 2.8.9 to 2.9.8 we ran into some trouble with serializing data in CBOR format. As it turns out the custom Jackson module we've been using is causing trouble in this newer version. These issues start at version…
Sander Koenders
  • 176
  • 1
  • 1
  • 10
4
votes
2 answers

Can't understand WebAuthn API error from JavaScript

I am currently building out an AJAX registration endpoint for Django to allow for FIDO2 authentication (physical hardware key login). This is from following the example/documentation from Yubico's official fido2 python library. The only…
Cody
  • 329
  • 4
  • 16
4
votes
1 answer

Are there any advantages to network byte order in a new protocol?

(I know many people are going to be tempted to close this question; please don't; I'm asking for concrete technical answers, if any exist.) "Network byte order" is big-endian for reasons that cannot be asked on stackoverflow. Lots of old protocols…
Timmmm
  • 88,195
  • 71
  • 364
  • 509
4
votes
3 answers

Comparing uint64_t and float for numeric equivalence

I am writing a protocol, that uses RFC 7049 as its binary representation. The standard states, that the protocol may use 32-bit floating point representation of numbers, if their numeric value is equivalent to respective 64-bit numbers. The…
Alexander Shishenko
  • 940
  • 1
  • 11
  • 28
3
votes
1 answer

Verify EU GreenPass with openSSL

I just received my Covid Green Pass. I've started to decode it, here are the fields I get: header: a20448349a42b0c2d0728e0126 payload:…
cdupont
  • 1,138
  • 10
  • 17
3
votes
1 answer

How to COSE sign CBOR binary document using C# .Net core?

How to COSE sign CBOR binary document using C# .Net core? I've found there is NuGet Package Com.AugustCellars.COSE But I'm new to this field and I can't find any examples, how to use it.
Arturs Mednis
  • 368
  • 1
  • 3
  • 12
3
votes
0 answers

Integer keys when serializing a POJO to CBOR with Jackson

I'm writing a Kotlin program (though there's nothing Kotlin-specific here, so Java-based answers are also welcome) that needs to communicate using a CBOR-based protocol. That protocol uses integers as field names to save space, and changing the…
thoom
  • 31
  • 2
3
votes
0 answers

Using the CBOR format instead of JSON in elasticsearch ingest plugin

In the documentation of Ingest Attachment Processor Plugin in Elasticsearch, it is mentioned, "If you do not want to incur the overhead of converting back and forth between base64, you can use the CBOR format instead of JSON and specify the field as…
1
2 3 4 5 6 7