Skip to content

Commit

Permalink
AES-CMAC messageg
Browse files Browse the repository at this point in the history
  • Loading branch information
RReichert committed Aug 14, 2024
1 parent 1250e65 commit 55ff859
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 1 deletion.
2 changes: 1 addition & 1 deletion python/tests/sbp/test_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_table_count():
Test number of available messages to deserialize.
"""
number_of_messages = 237
number_of_messages = 238
assert len(_SBP_TABLE) == number_of_messages

def test_table_unqiue_count():
Expand Down
52 changes: 52 additions & 0 deletions spec/tests/yaml/swiftnav/sbp/signing/test_MsgAesCmacSignature.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
description: Unit tests for swiftnav.sbp.signing MsgAesCmacSignature
generated_on: '2023-03-17 19:24:46.292191'
package: sbp.signing
tests:
- msg:
c_decoded_fields:
n_signed_messages:
handle_as: vararray-len
relates_to: signed_messages
value: 3
fields:
stream_counter: 1
on_demand_counter: 2
certificate_id:
- 1
- 2
- 3
- 4
signature:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
flags: 0
signed_messages:
- 11
- 22
- 33
module: sbp.signing
name: MsgAesCmacSignature
msg_type: '0xC10'
raw_json: '{"crc":5568,"length":26,"msg_type":3088,"msg_name":"MSG_AES_CMAC_SIGNATURE","payload":"AQIBAgMEAAECAwQFBgcICQoLDA0ODwALFiE=","preamble":85,"sender":66,"stream_counter":1,"on_demand_counter":2,"certificate_id":[1,2,3,4],"signature":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],"flags":0,"signed_messages":[11,22,33]}'
raw_packet: VRAMQgAaAQIBAgMEAAECAwQFBgcICQoLDA0ODwALFiHAFQ==
sbp:
crc: '0x15C0'
length: 26
msg_type: '0xC10'
payload: AQIBAgMEAAECAwQFBgcICQoLDA0ODwALFiE=
preamble: '0x55'
sender: '0x42'
50 changes: 50 additions & 0 deletions spec/yaml/swiftnav/sbp/signing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,56 @@ definitions:
`expiration`. This certificate chain (allow list) can also be
validated by fetching it from `http(s)://certs.swiftnav.com/chain`.
- MSG_AES_CMAC_SIGNATURE:
id: 0x0C10
short_desc: AES-CMAC 128 digital signature
desc: Digital signature using AES-CMAC 128 algorithm used for data integrity.
fields:
- stream_counter:
type: u8
desc: >
Signature message counter. Zero indexed and incremented with each
signature message. The counter will not increment if this message
was in response to an on demand request. The counter will roll
over after 256 messages. Upon connection, the value of the counter
may not initially be zero.
- on_demand_counter:
type: u8
desc: >
On demand message counter. Zero indexed and incremented with each
signature message sent in response to an on demand message. The
counter will roll over after 256 messages. Upon connection, the
value of the counter may not initially be zero.
- certificate_id:
type: array
fill: u8
size: 4
desc: The last 4 bytes of the certificate's SHA-1 fingerprint
- signature:
type: array
fill: u8
size: 16
desc: Signature
- flags:
type: u8
desc: Describes the format of the 'signed messages' field below.
fields:
- 0-1:
desc: CRC type
values:
- 0: 24-bit CRCs from RTCM framing
- 1: 16-bit CRCs from SBP framing
- signed_messages:
type: array
fill: u8
desc: >
CRCs of the messages covered by this signature. For Skylark,
which delivers SBP messages wrapped in Swift's proprietary RTCM
message, these are the 24-bit CRCs from the RTCM message framing.
For SBP only streams, this will be 16-bit CRCs from the SBP
framing. See the `flags` field to determine the type of CRCs
covered.
- MSG_ECDSA_SIGNATURE:
id: 0x0C08
short_desc: An ECDSA signature
Expand Down

0 comments on commit 55ff859

Please sign in to comment.