diff --git a/pep-keysync/Makefile b/pep-keysync/Makefile index c580505..efe74c7 100644 --- a/pep-keysync/Makefile +++ b/pep-keysync/Makefile @@ -38,6 +38,7 @@ $(DRAFT).xml: $(NAME).mkd \ ../shared/ascii-arts/sync/join-device-group.atxt \ ../shared/text-blocks/more-info-following-code.mkd \ excerpts/sync.fsm \ + excerpts/pEp.asn1 \ # ../shared/author_tags/claudio_luck.mkd \ # ../shared/author_tags/hernani_marques.mkd \ # ../shared/ascii-arts/basic-msg-flow.mkd \ diff --git a/pep-keysync/draft-pep-keysync.mkd b/pep-keysync/draft-pep-keysync.mkd index 20dc6e7..3d3a052 100644 --- a/pep-keysync/draft-pep-keysync.mkd +++ b/pep-keysync/draft-pep-keysync.mkd @@ -1838,56 +1838,15 @@ Below you can find the code excerpt for the pEp KeySync FSM, including messages ## ASN.1 Type Definitions {#asn-type-definitions-code} -Below you can find the ASN.1 Type definitions for the messages used in pEp KeySync FSM. - +Below you can find the ASN.1 Type definitions for the messages used in pEp KeySync FSM: {::include ../shared/fence-line.mkd} --- This file is under BSD License 2.0 - --- Sync protocol for pEp --- Copyright (c) 2016, 2017 pEp foundation - --- Written by Volker Birk - -pEp - { iso(1) org(3) dod(6) internet(1) private(4) enterprise(1) -pEp(47878) basic(0) } - -DEFINITIONS AUTOMATIC TAGS EXTENSIBILITY IMPLIED ::= - -BEGIN - -EXPORTS Identity, IdentityList, TID, Hash, Version; - -ISO639-1 ::= PrintableString(FROM ("a".."z")) (SIZE(2)) -Hex ::= PrintableString(FROM ("A".."F") | FROM ("0".."9")) -Hash ::= Hex(SIZE(16..128)) -- 32bit Key ID to SHA512 in hex -PString ::= UTF8String (SIZE(1..1024)) -TID ::= OCTET STRING (SIZE(16)) -- UUID version 4 variant 1 - -Identity ::= SEQUENCE { - address PString, - fpr Hash, - user-id PString, - username PString, - comm-type INTEGER (0..255), - lang ISO639-1 -} - -IdentityList ::= SEQUENCE OF Identity - -Version ::= SEQUENCE { - major INTEGER (0..255) DEFAULT 1, - minor INTEGER (0..255) DEFAULT 2 -} - -END +{::include excerpts/pEp.asn1} {::include ../shared/fence-line.mkd} - # Document Changelog \[\[ RFC Editor: This section is to be removed before publication \]\] diff --git a/pep-keysync/excerpts/pEp.asn1 b/pep-keysync/excerpts/pEp.asn1 new file mode 100644 index 0000000..0345f83 --- /dev/null +++ b/pep-keysync/excerpts/pEp.asn1 @@ -0,0 +1,76 @@ +-- This file is under BSD License 2.0 + +-- Sync protocol for p≡p +-- Copyright (c) 2016-2021 p≡p foundation + +-- Written by Volker Birk + +PEP + { iso(1) org(3) dod(6) internet(1) private(4) + enterprise(1) pEp(47878) basic(0) } + +DEFINITIONS AUTOMATIC TAGS EXTENSIBILITY IMPLIED ::= + +BEGIN + +EXPORTS Identity, IdentityList, TID, Hash, Version, Rating, PString, + PStringList, PStringPair, PStringPairList, ISO639-1; + +ISO639-1 ::= PrintableString(FROM ("a".."z")) (SIZE(2)) +Hex ::= PrintableString(FROM ("A".."F" | "0".."9")) +Hash ::= Hex(SIZE(16..128)) -- 32bit Key ID to SHA512 in hex +PString ::= UTF8String (SIZE(0..1024)) +PStringList ::= SEQUENCE OF PString +TID ::= OCTET STRING (SIZE(16)) -- UUID version 4 variant 1 + +Identity ::= SEQUENCE { + address PString, + fpr Hash, + user-id PString, + username PString, + comm-type INTEGER (0..255), + lang ISO639-1 +} + +IdentityList ::= SEQUENCE OF Identity + +Version ::= SEQUENCE { + major INTEGER (0..255) DEFAULT 1, + minor INTEGER (0..255) DEFAULT 2 +} + +Rating ::= ENUMERATED { + -- no color + + cannot-decrypt (1), + have-no-key (2), + unencrypted (3), + unreliable (5), + + b0rken (-2), + + -- yellow + + reliable (6), + + -- green + + trusted (7), + trusted-and-anonymized (8), + fully-anonymous (9), + + -- red + + mistrust (-1), + under-attack (-3) +} + +PStringPair ::= SEQUENCE { + key PString, + value PString +} + +PStringPairList ::= SEQUENCE OF PStringPair + +END +