From f857d89af4669f750af1f3f814c919858f4507ee Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 22 Jan 2019 19:33:07 -0800 Subject: [PATCH] change to new keys --- asn.cpp | 14 ++-- asn.h | 14 ++-- ...ndleEntry.c => BLS12381OAQUEBundleEntry.c} | 56 +++++++-------- ...ndleEntry.h => BLS12381OAQUEBundleEntry.h} | 30 ++++---- ...gBundle.c => BLS12381OAQUEKeyringBundle.c} | 50 ++++++------- ...gBundle.h => BLS12381OAQUEKeyringBundle.h} | 26 +++---- asn1c_files/Makefile.am.asn1convert | 2 +- asn1c_files/Makefile.am.libasncodec | 36 +++++----- asn1c_files/Master-BLS12381-IBE.c | 31 ++++++++ asn1c_files/Master-BLS12381-IBE.h | 43 +++++++++++ asn1c_files/Master-BLS12381-OAQUE.c | 31 ++++++++ asn1c_files/Master-BLS12381-OAQUE.h | 43 +++++++++++ asn1c_files/Master-BN256-IBE.c | 31 -------- asn1c_files/Master-BN256-IBE.h | 43 ----------- asn1c_files/Master-BN256-OAQUE.c | 31 -------- asn1c_files/Master-BN256-OAQUE.h | 43 ----------- asn1c_files/MessageKeyWR1.c | 6 +- asn1c_files/MessageKeyWR1.h | 2 +- asn1c_files/NameDeclarationKeyWR1.c | 6 +- asn1c_files/NameDeclarationKeyWR1.h | 2 +- asn1c_files/Params-BLS12381-IBE.c | 31 ++++++++ asn1c_files/Params-BLS12381-IBE.h | 43 +++++++++++ asn1c_files/Params-BLS12381-OAQUE.c | 31 ++++++++ asn1c_files/Params-BLS12381-OAQUE.h | 43 +++++++++++ asn1c_files/Params-BN256-IBE.c | 31 -------- asn1c_files/Params-BN256-IBE.h | 43 ----------- asn1c_files/Params-BN256-OAQUE.c | 31 -------- asn1c_files/Params-BN256-OAQUE.h | 43 ----------- asn1c_files/Private-BLS12381-IBE.c | 31 ++++++++ asn1c_files/Private-BLS12381-IBE.h | 43 +++++++++++ asn1c_files/Private-BLS12381-OAQUE.c | 31 ++++++++ asn1c_files/Private-BLS12381-OAQUE.h | 43 +++++++++++ asn1c_files/Private-BN256-IBE.c | 31 -------- asn1c_files/Private-BN256-IBE.h | 43 ----------- asn1c_files/Private-BN256-OAQUE.c | 31 -------- asn1c_files/Private-BN256-OAQUE.h | 43 ----------- asn1c_files/Public-BLS12381-IBE.c | 60 ++++++++++++++++ ...blic-BN256-IBE.h => Public-BLS12381-IBE.h} | 18 ++--- asn1c_files/Public-BN256-IBE.c | 60 ---------------- asn1c_files/Public-OAQUE.c | 2 +- asn1c_files/Public-OAQUE.h | 4 +- asn1c_files/WR1BodyCiphertext.c | 6 +- asn1c_files/WR1BodyCiphertext.h | 2 +- asn1c_files/converter-example.mk | 2 +- asn1c_files/objects-lite.asn | 56 +++++++-------- asn1c_files/pdu_collection.c | 20 +++--- verify.cpp | 71 +++++-------------- 47 files changed, 700 insertions(+), 733 deletions(-) rename asn1c_files/{BN256OAQUEBundleEntry.c => BLS12381OAQUEBundleEntry.c} (65%) rename asn1c_files/{BN256OAQUEBundleEntry.h => BLS12381OAQUEBundleEntry.h} (53%) rename asn1c_files/{BN256OAQUEKeyringBundle.c => BLS12381OAQUEKeyringBundle.c} (54%) rename asn1c_files/{BN256OAQUEKeyringBundle.h => BLS12381OAQUEKeyringBundle.h} (55%) create mode 100644 asn1c_files/Master-BLS12381-IBE.c create mode 100644 asn1c_files/Master-BLS12381-IBE.h create mode 100644 asn1c_files/Master-BLS12381-OAQUE.c create mode 100644 asn1c_files/Master-BLS12381-OAQUE.h delete mode 100644 asn1c_files/Master-BN256-IBE.c delete mode 100644 asn1c_files/Master-BN256-IBE.h delete mode 100644 asn1c_files/Master-BN256-OAQUE.c delete mode 100644 asn1c_files/Master-BN256-OAQUE.h create mode 100644 asn1c_files/Params-BLS12381-IBE.c create mode 100644 asn1c_files/Params-BLS12381-IBE.h create mode 100644 asn1c_files/Params-BLS12381-OAQUE.c create mode 100644 asn1c_files/Params-BLS12381-OAQUE.h delete mode 100644 asn1c_files/Params-BN256-IBE.c delete mode 100644 asn1c_files/Params-BN256-IBE.h delete mode 100644 asn1c_files/Params-BN256-OAQUE.c delete mode 100644 asn1c_files/Params-BN256-OAQUE.h create mode 100644 asn1c_files/Private-BLS12381-IBE.c create mode 100644 asn1c_files/Private-BLS12381-IBE.h create mode 100644 asn1c_files/Private-BLS12381-OAQUE.c create mode 100644 asn1c_files/Private-BLS12381-OAQUE.h delete mode 100644 asn1c_files/Private-BN256-IBE.c delete mode 100644 asn1c_files/Private-BN256-IBE.h delete mode 100644 asn1c_files/Private-BN256-OAQUE.c delete mode 100644 asn1c_files/Private-BN256-OAQUE.h create mode 100644 asn1c_files/Public-BLS12381-IBE.c rename asn1c_files/{Public-BN256-IBE.h => Public-BLS12381-IBE.h} (61%) delete mode 100644 asn1c_files/Public-BN256-IBE.c diff --git a/asn.cpp b/asn.cpp index 7b09af0..738381d 100644 --- a/asn.cpp +++ b/asn.cpp @@ -77,14 +77,14 @@ string getTypeId(asn_TYPE_descriptor_t *td) { return idJoiner(EntityKeyScheme, Ed25519Id); } else if (td == &asn_DEF_Public_Curve25519) { return idJoiner(EntityKeyScheme, Curve25519Id); - } else if (td == &asn_DEF_Params_BN256_IBE) { - return idJoiner(EntityKeyScheme, IbeBn256ParamsId); - } else if (td == &asn_DEF_Public_BN256_IBE) { - return idJoiner(EntityKeyScheme, IbeBn256PublicId); - } else if (td == &asn_DEF_Params_BN256_OAQUE) { - return idJoiner(EntityKeyScheme, OaqueBn256S20ParamsId); + } else if (td == &asn_DEF_Params_BLS12381_IBE) { + return idJoiner(EntityKeyScheme, IbeBLS12381ParamsId); + } else if (td == &asn_DEF_Public_BLS12381_IBE) { + return idJoiner(EntityKeyScheme, IbeBLS12381PublicId); + } else if (td == &asn_DEF_Params_BLS12381_OAQUE) { + return idJoiner(EntityKeyScheme, OaqueBLS12381S20ParamsId); } else if (td == &asn_DEF_Public_OAQUE) { - return idJoiner(EntityKeyScheme, OaqueBn256S20AttributesetId); + return idJoiner(EntityKeyScheme, OaqueBLS12381S20AttributesetId); } else if (td == &asn_DEF_AttestationBody) { return idJoiner(AttestationBodyScheme, UnencryptedBodyScheme); } else if (td == &asn_DEF_WR1BodyCiphertext) { diff --git a/asn.h b/asn.h index 2d08b45..49fa3f0 100644 --- a/asn.h +++ b/asn.h @@ -10,9 +10,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -36,10 +36,10 @@ const string WaveObjectIdentifier("1.3.6.1.4.1.51157"); const string EntityKeyScheme("11"); const string Ed25519Id("1"); const string Curve25519Id("2"); -const string OaqueBn256S20AttributesetId("3"); -const string OaqueBn256S20ParamsId("4"); -const string IbeBn256ParamsId("5"); -const string IbeBn256PublicId("6"); +const string OaqueBLS12381S20AttributesetId("7"); +const string OaqueBLS12381S20ParamsId("8"); +const string IbeBLS12381ParamsId("9"); +const string IbeBLS12381PublicId("10"); const string AttestationBodyScheme("3"); const string UnencryptedBodyScheme("1"); const string WR1BodySchemeV1("2"); diff --git a/asn1c_files/BN256OAQUEBundleEntry.c b/asn1c_files/BLS12381OAQUEBundleEntry.c similarity index 65% rename from asn1c_files/BN256OAQUEBundleEntry.c rename to asn1c_files/BLS12381OAQUEBundleEntry.c index 8bb32d4..d98b9fc 100644 --- a/asn1c_files/BN256OAQUEBundleEntry.c +++ b/asn1c_files/BLS12381OAQUEBundleEntry.c @@ -5,10 +5,10 @@ * `asn1c -fcompound-names` */ -#include "BN256OAQUEBundleEntry.h" +#include "BLS12381OAQUEBundleEntry.h" static asn_TYPE_member_t asn_MBR_Member_3[] = { - { ATF_NOFLAGS, 0, offsetof(struct BN256OAQUEBundleEntry__partitionChange__Member, index), + { ATF_NOFLAGS, 0, offsetof(struct BLS12381OAQUEBundleEntry__partitionChange__Member, index), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_NativeInteger, @@ -17,7 +17,7 @@ static asn_TYPE_member_t asn_MBR_Member_3[] = { 0, 0, /* No default value */ "index" }, - { ATF_NOFLAGS, 0, offsetof(struct BN256OAQUEBundleEntry__partitionChange__Member, content), + { ATF_NOFLAGS, 0, offsetof(struct BLS12381OAQUEBundleEntry__partitionChange__Member, content), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_OCTET_STRING, @@ -35,8 +35,8 @@ static const asn_TYPE_tag2member_t asn_MAP_Member_tag2el_3[] = { { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, 0, 0 } /* content */ }; static asn_SEQUENCE_specifics_t asn_SPC_Member_specs_3 = { - sizeof(struct BN256OAQUEBundleEntry__partitionChange__Member), - offsetof(struct BN256OAQUEBundleEntry__partitionChange__Member, _asn_ctx), + sizeof(struct BLS12381OAQUEBundleEntry__partitionChange__Member), + offsetof(struct BLS12381OAQUEBundleEntry__partitionChange__Member, _asn_ctx), asn_MAP_Member_tag2el_3, 2, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ @@ -74,8 +74,8 @@ static const ber_tlv_tag_t asn_DEF_partitionChange_tags_2[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_SET_OF_specifics_t asn_SPC_partitionChange_specs_2 = { - sizeof(struct BN256OAQUEBundleEntry__partitionChange), - offsetof(struct BN256OAQUEBundleEntry__partitionChange, _asn_ctx), + sizeof(struct BLS12381OAQUEBundleEntry__partitionChange), + offsetof(struct BLS12381OAQUEBundleEntry__partitionChange, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; static /* Use -fall-defs-global to expose */ @@ -95,8 +95,8 @@ asn_TYPE_descriptor_t asn_DEF_partitionChange_2 = { &asn_SPC_partitionChange_specs_2 /* Additional specs */ }; -asn_TYPE_member_t asn_MBR_BN256OAQUEBundleEntry_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct BN256OAQUEBundleEntry, partitionChange), +asn_TYPE_member_t asn_MBR_BLS12381OAQUEBundleEntry_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct BLS12381OAQUEBundleEntry, partitionChange), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_partitionChange_2, @@ -105,44 +105,44 @@ asn_TYPE_member_t asn_MBR_BN256OAQUEBundleEntry_1[] = { 0, 0, /* No default value */ "partitionChange" }, - { ATF_NOFLAGS, 0, offsetof(struct BN256OAQUEBundleEntry, key), + { ATF_NOFLAGS, 0, offsetof(struct BLS12381OAQUEBundleEntry, key), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, - &asn_DEF_Private_BN256_OAQUE, + &asn_DEF_Private_BLS12381_OAQUE, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "key" }, }; -static const ber_tlv_tag_t asn_DEF_BN256OAQUEBundleEntry_tags_1[] = { +static const ber_tlv_tag_t asn_DEF_BLS12381OAQUEBundleEntry_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static const asn_TYPE_tag2member_t asn_MAP_BN256OAQUEBundleEntry_tag2el_1[] = { +static const asn_TYPE_tag2member_t asn_MAP_BLS12381OAQUEBundleEntry_tag2el_1[] = { { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, 0, 0 }, /* key */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* partitionChange */ }; -asn_SEQUENCE_specifics_t asn_SPC_BN256OAQUEBundleEntry_specs_1 = { - sizeof(struct BN256OAQUEBundleEntry), - offsetof(struct BN256OAQUEBundleEntry, _asn_ctx), - asn_MAP_BN256OAQUEBundleEntry_tag2el_1, +asn_SEQUENCE_specifics_t asn_SPC_BLS12381OAQUEBundleEntry_specs_1 = { + sizeof(struct BLS12381OAQUEBundleEntry), + offsetof(struct BLS12381OAQUEBundleEntry, _asn_ctx), + asn_MAP_BLS12381OAQUEBundleEntry_tag2el_1, 2, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; -asn_TYPE_descriptor_t asn_DEF_BN256OAQUEBundleEntry = { - "BN256OAQUEBundleEntry", - "BN256OAQUEBundleEntry", +asn_TYPE_descriptor_t asn_DEF_BLS12381OAQUEBundleEntry = { + "BLS12381OAQUEBundleEntry", + "BLS12381OAQUEBundleEntry", &asn_OP_SEQUENCE, - asn_DEF_BN256OAQUEBundleEntry_tags_1, - sizeof(asn_DEF_BN256OAQUEBundleEntry_tags_1) - /sizeof(asn_DEF_BN256OAQUEBundleEntry_tags_1[0]), /* 1 */ - asn_DEF_BN256OAQUEBundleEntry_tags_1, /* Same as above */ - sizeof(asn_DEF_BN256OAQUEBundleEntry_tags_1) - /sizeof(asn_DEF_BN256OAQUEBundleEntry_tags_1[0]), /* 1 */ + asn_DEF_BLS12381OAQUEBundleEntry_tags_1, + sizeof(asn_DEF_BLS12381OAQUEBundleEntry_tags_1) + /sizeof(asn_DEF_BLS12381OAQUEBundleEntry_tags_1[0]), /* 1 */ + asn_DEF_BLS12381OAQUEBundleEntry_tags_1, /* Same as above */ + sizeof(asn_DEF_BLS12381OAQUEBundleEntry_tags_1) + /sizeof(asn_DEF_BLS12381OAQUEBundleEntry_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, - asn_MBR_BN256OAQUEBundleEntry_1, + asn_MBR_BLS12381OAQUEBundleEntry_1, 2, /* Elements count */ - &asn_SPC_BN256OAQUEBundleEntry_specs_1 /* Additional specs */ + &asn_SPC_BLS12381OAQUEBundleEntry_specs_1 /* Additional specs */ }; diff --git a/asn1c_files/BN256OAQUEBundleEntry.h b/asn1c_files/BLS12381OAQUEBundleEntry.h similarity index 53% rename from asn1c_files/BN256OAQUEBundleEntry.h rename to asn1c_files/BLS12381OAQUEBundleEntry.h index 914c3be..71cc347 100644 --- a/asn1c_files/BN256OAQUEBundleEntry.h +++ b/asn1c_files/BLS12381OAQUEBundleEntry.h @@ -5,14 +5,14 @@ * `asn1c -fcompound-names` */ -#ifndef _BN256OAQUEBundleEntry_H_ -#define _BN256OAQUEBundleEntry_H_ +#ifndef _BLS12381OAQUEBundleEntry_H_ +#define _BLS12381OAQUEBundleEntry_H_ #include /* Including external dependencies */ -#include "Private-BN256-OAQUE.h" +#include "Private-BLS12381-OAQUE.h" #include #include #include @@ -24,36 +24,36 @@ extern "C" { #endif /* Forward definitions */ -typedef struct BN256OAQUEBundleEntry__partitionChange__Member { +typedef struct BLS12381OAQUEBundleEntry__partitionChange__Member { long index; OCTET_STRING_t content; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; -} BN256OAQUEBundleEntry__partitionChange__Member; +} BLS12381OAQUEBundleEntry__partitionChange__Member; -/* BN256OAQUEBundleEntry */ -typedef struct BN256OAQUEBundleEntry { - struct BN256OAQUEBundleEntry__partitionChange { - A_SEQUENCE_OF(BN256OAQUEBundleEntry__partitionChange__Member) list; +/* BLS12381OAQUEBundleEntry */ +typedef struct BLS12381OAQUEBundleEntry { + struct BLS12381OAQUEBundleEntry__partitionChange { + A_SEQUENCE_OF(BLS12381OAQUEBundleEntry__partitionChange__Member) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } partitionChange; - Private_BN256_OAQUE_t key; + Private_BLS12381_OAQUE_t key; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; -} BN256OAQUEBundleEntry_t; +} BLS12381OAQUEBundleEntry_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_BN256OAQUEBundleEntry; -extern asn_SEQUENCE_specifics_t asn_SPC_BN256OAQUEBundleEntry_specs_1; -extern asn_TYPE_member_t asn_MBR_BN256OAQUEBundleEntry_1[2]; +extern asn_TYPE_descriptor_t asn_DEF_BLS12381OAQUEBundleEntry; +extern asn_SEQUENCE_specifics_t asn_SPC_BLS12381OAQUEBundleEntry_specs_1; +extern asn_TYPE_member_t asn_MBR_BLS12381OAQUEBundleEntry_1[2]; #ifdef __cplusplus } #endif -#endif /* _BN256OAQUEBundleEntry_H_ */ +#endif /* _BLS12381OAQUEBundleEntry_H_ */ #include diff --git a/asn1c_files/BN256OAQUEKeyringBundle.c b/asn1c_files/BLS12381OAQUEKeyringBundle.c similarity index 54% rename from asn1c_files/BN256OAQUEKeyringBundle.c rename to asn1c_files/BLS12381OAQUEKeyringBundle.c index 5a38e14..fe34aa4 100644 --- a/asn1c_files/BN256OAQUEKeyringBundle.c +++ b/asn1c_files/BLS12381OAQUEKeyringBundle.c @@ -5,13 +5,13 @@ * `asn1c -fcompound-names` */ -#include "BN256OAQUEKeyringBundle.h" +#include "BLS12381OAQUEKeyringBundle.h" static asn_TYPE_member_t asn_MBR_entries_3[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, - &asn_DEF_BN256OAQUEBundleEntry, + &asn_DEF_BLS12381OAQUEBundleEntry, 0, { 0, 0, 0 }, 0, 0, /* No default value */ @@ -22,8 +22,8 @@ static const ber_tlv_tag_t asn_DEF_entries_tags_3[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_SET_OF_specifics_t asn_SPC_entries_specs_3 = { - sizeof(struct BN256OAQUEKeyringBundle__entries), - offsetof(struct BN256OAQUEKeyringBundle__entries, _asn_ctx), + sizeof(struct BLS12381OAQUEKeyringBundle__entries), + offsetof(struct BLS12381OAQUEKeyringBundle__entries, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; static /* Use -fall-defs-global to expose */ @@ -43,17 +43,17 @@ asn_TYPE_descriptor_t asn_DEF_entries_3 = { &asn_SPC_entries_specs_3 /* Additional specs */ }; -static asn_TYPE_member_t asn_MBR_BN256OAQUEKeyringBundle_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct BN256OAQUEKeyringBundle, params), +static asn_TYPE_member_t asn_MBR_BLS12381OAQUEKeyringBundle_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct BLS12381OAQUEKeyringBundle, params), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, - &asn_DEF_Params_BN256_OAQUE, + &asn_DEF_Params_BLS12381_OAQUE, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "params" }, - { ATF_NOFLAGS, 0, offsetof(struct BN256OAQUEKeyringBundle, entries), + { ATF_NOFLAGS, 0, offsetof(struct BLS12381OAQUEKeyringBundle, entries), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_entries_3, @@ -63,34 +63,34 @@ static asn_TYPE_member_t asn_MBR_BN256OAQUEKeyringBundle_1[] = { "entries" }, }; -static const ber_tlv_tag_t asn_DEF_BN256OAQUEKeyringBundle_tags_1[] = { +static const ber_tlv_tag_t asn_DEF_BLS12381OAQUEKeyringBundle_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static const asn_TYPE_tag2member_t asn_MAP_BN256OAQUEKeyringBundle_tag2el_1[] = { +static const asn_TYPE_tag2member_t asn_MAP_BLS12381OAQUEKeyringBundle_tag2el_1[] = { { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 0 }, /* params */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 } /* entries */ }; -static asn_SEQUENCE_specifics_t asn_SPC_BN256OAQUEKeyringBundle_specs_1 = { - sizeof(struct BN256OAQUEKeyringBundle), - offsetof(struct BN256OAQUEKeyringBundle, _asn_ctx), - asn_MAP_BN256OAQUEKeyringBundle_tag2el_1, +static asn_SEQUENCE_specifics_t asn_SPC_BLS12381OAQUEKeyringBundle_specs_1 = { + sizeof(struct BLS12381OAQUEKeyringBundle), + offsetof(struct BLS12381OAQUEKeyringBundle, _asn_ctx), + asn_MAP_BLS12381OAQUEKeyringBundle_tag2el_1, 2, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; -asn_TYPE_descriptor_t asn_DEF_BN256OAQUEKeyringBundle = { - "BN256OAQUEKeyringBundle", - "BN256OAQUEKeyringBundle", +asn_TYPE_descriptor_t asn_DEF_BLS12381OAQUEKeyringBundle = { + "BLS12381OAQUEKeyringBundle", + "BLS12381OAQUEKeyringBundle", &asn_OP_SEQUENCE, - asn_DEF_BN256OAQUEKeyringBundle_tags_1, - sizeof(asn_DEF_BN256OAQUEKeyringBundle_tags_1) - /sizeof(asn_DEF_BN256OAQUEKeyringBundle_tags_1[0]), /* 1 */ - asn_DEF_BN256OAQUEKeyringBundle_tags_1, /* Same as above */ - sizeof(asn_DEF_BN256OAQUEKeyringBundle_tags_1) - /sizeof(asn_DEF_BN256OAQUEKeyringBundle_tags_1[0]), /* 1 */ + asn_DEF_BLS12381OAQUEKeyringBundle_tags_1, + sizeof(asn_DEF_BLS12381OAQUEKeyringBundle_tags_1) + /sizeof(asn_DEF_BLS12381OAQUEKeyringBundle_tags_1[0]), /* 1 */ + asn_DEF_BLS12381OAQUEKeyringBundle_tags_1, /* Same as above */ + sizeof(asn_DEF_BLS12381OAQUEKeyringBundle_tags_1) + /sizeof(asn_DEF_BLS12381OAQUEKeyringBundle_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, - asn_MBR_BN256OAQUEKeyringBundle_1, + asn_MBR_BLS12381OAQUEKeyringBundle_1, 2, /* Elements count */ - &asn_SPC_BN256OAQUEKeyringBundle_specs_1 /* Additional specs */ + &asn_SPC_BLS12381OAQUEKeyringBundle_specs_1 /* Additional specs */ }; diff --git a/asn1c_files/BN256OAQUEKeyringBundle.h b/asn1c_files/BLS12381OAQUEKeyringBundle.h similarity index 55% rename from asn1c_files/BN256OAQUEKeyringBundle.h rename to asn1c_files/BLS12381OAQUEKeyringBundle.h index ffd5fd6..faf9af1 100644 --- a/asn1c_files/BN256OAQUEKeyringBundle.h +++ b/asn1c_files/BLS12381OAQUEKeyringBundle.h @@ -5,14 +5,14 @@ * `asn1c -fcompound-names` */ -#ifndef _BN256OAQUEKeyringBundle_H_ -#define _BN256OAQUEKeyringBundle_H_ +#ifndef _BLS12381OAQUEKeyringBundle_H_ +#define _BLS12381OAQUEKeyringBundle_H_ #include /* Including external dependencies */ -#include "Params-BN256-OAQUE.h" +#include "Params-BLS12381-OAQUE.h" #include #include #include @@ -22,13 +22,13 @@ extern "C" { #endif /* Forward declarations */ -struct BN256OAQUEBundleEntry; +struct BLS12381OAQUEBundleEntry; -/* BN256OAQUEKeyringBundle */ -typedef struct BN256OAQUEKeyringBundle { - Params_BN256_OAQUE_t params; - struct BN256OAQUEKeyringBundle__entries { - A_SEQUENCE_OF(struct BN256OAQUEBundleEntry) list; +/* BLS12381OAQUEKeyringBundle */ +typedef struct BLS12381OAQUEKeyringBundle { + Params_BLS12381_OAQUE_t params; + struct BLS12381OAQUEKeyringBundle__entries { + A_SEQUENCE_OF(struct BLS12381OAQUEBundleEntry) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; @@ -36,17 +36,17 @@ typedef struct BN256OAQUEKeyringBundle { /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; -} BN256OAQUEKeyringBundle_t; +} BLS12381OAQUEKeyringBundle_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_BN256OAQUEKeyringBundle; +extern asn_TYPE_descriptor_t asn_DEF_BLS12381OAQUEKeyringBundle; #ifdef __cplusplus } #endif /* Referred external types */ -#include "BN256OAQUEBundleEntry.h" +#include "BLS12381OAQUEBundleEntry.h" -#endif /* _BN256OAQUEKeyringBundle_H_ */ +#endif /* _BLS12381OAQUEKeyringBundle_H_ */ #include diff --git a/asn1c_files/Makefile.am.asn1convert b/asn1c_files/Makefile.am.asn1convert index 1345934..6f4f10b 100644 --- a/asn1c_files/Makefile.am.asn1convert +++ b/asn1c_files/Makefile.am.asn1convert @@ -10,5 +10,5 @@ asn1convert_SOURCES = \ regen: regenerate-from-asn1-source regenerate-from-asn1-source: - /usr/local/bin/asn1c -fcompound-names objects-lite.asn + asn1c -fcompound-names objects-lite.asn diff --git a/asn1c_files/Makefile.am.libasncodec b/asn1c_files/Makefile.am.libasncodec index a42e1a0..3b933ce 100644 --- a/asn1c_files/Makefile.am.libasncodec +++ b/asn1c_files/Makefile.am.libasncodec @@ -12,8 +12,8 @@ ASN_MODULE_SRCS= \ WaveEntitySecret.c \ EntityKeyring.c \ EntityKeyringEntry.c \ - BN256OAQUEKeyringBundle.c \ - BN256OAQUEBundleEntry.c \ + BLS12381OAQUEKeyringBundle.c \ + BLS12381OAQUEBundleEntry.c \ EntityPrivateKey.c \ EntityPublicKey.c \ Capability.c \ @@ -52,16 +52,16 @@ ASN_MODULE_SRCS= \ AVKeyAES128-GCM.c \ Private-Ed25519.c \ Private-Curve25519.c \ - Private-BN256-OAQUE.c \ - Private-BN256-IBE.c \ - Master-BN256-OAQUE.c \ - Master-BN256-IBE.c \ + Private-BLS12381-OAQUE.c \ + Private-BLS12381-IBE.c \ + Master-BLS12381-OAQUE.c \ + Master-BLS12381-IBE.c \ Public-Ed25519.c \ Public-Curve25519.c \ Public-OAQUE.c \ - Params-BN256-OAQUE.c \ - Params-BN256-IBE.c \ - Public-BN256-IBE.c \ + Params-BLS12381-OAQUE.c \ + Params-BLS12381-IBE.c \ + Public-BLS12381-IBE.c \ KeyringAESCiphertext.c \ MessageKeyCurve25519ECDH.c \ MessageKeyWR1.c \ @@ -82,8 +82,8 @@ ASN_MODULE_HDRS= \ WaveEntitySecret.h \ EntityKeyring.h \ EntityKeyringEntry.h \ - BN256OAQUEKeyringBundle.h \ - BN256OAQUEBundleEntry.h \ + BLS12381OAQUEKeyringBundle.h \ + BLS12381OAQUEBundleEntry.h \ EntityPrivateKey.h \ EntityPublicKey.h \ Capability.h \ @@ -122,16 +122,16 @@ ASN_MODULE_HDRS= \ AVKeyAES128-GCM.h \ Private-Ed25519.h \ Private-Curve25519.h \ - Private-BN256-OAQUE.h \ - Private-BN256-IBE.h \ - Master-BN256-OAQUE.h \ - Master-BN256-IBE.h \ + Private-BLS12381-OAQUE.h \ + Private-BLS12381-IBE.h \ + Master-BLS12381-OAQUE.h \ + Master-BLS12381-IBE.h \ Public-Ed25519.h \ Public-Curve25519.h \ Public-OAQUE.h \ - Params-BN256-OAQUE.h \ - Params-BN256-IBE.h \ - Public-BN256-IBE.h \ + Params-BLS12381-OAQUE.h \ + Params-BLS12381-IBE.h \ + Public-BLS12381-IBE.h \ KeyringAESCiphertext.h \ MessageKeyCurve25519ECDH.h \ MessageKeyWR1.h \ diff --git a/asn1c_files/Master-BLS12381-IBE.c b/asn1c_files/Master-BLS12381-IBE.c new file mode 100644 index 0000000..a6472cb --- /dev/null +++ b/asn1c_files/Master-BLS12381-IBE.c @@ -0,0 +1,31 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "WAVE-Schema" + * found in "objects-lite.asn" + * `asn1c -fcompound-names` + */ + +#include "Master-BLS12381-IBE.h" + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_Master_BLS12381_IBE_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Master_BLS12381_IBE = { + "Master-BLS12381-IBE", + "Master-BLS12381-IBE", + &asn_OP_OCTET_STRING, + asn_DEF_Master_BLS12381_IBE_tags_1, + sizeof(asn_DEF_Master_BLS12381_IBE_tags_1) + /sizeof(asn_DEF_Master_BLS12381_IBE_tags_1[0]), /* 1 */ + asn_DEF_Master_BLS12381_IBE_tags_1, /* Same as above */ + sizeof(asn_DEF_Master_BLS12381_IBE_tags_1) + /sizeof(asn_DEF_Master_BLS12381_IBE_tags_1[0]), /* 1 */ + { 0, 0, OCTET_STRING_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/asn1c_files/Master-BLS12381-IBE.h b/asn1c_files/Master-BLS12381-IBE.h new file mode 100644 index 0000000..eeac446 --- /dev/null +++ b/asn1c_files/Master-BLS12381-IBE.h @@ -0,0 +1,43 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "WAVE-Schema" + * found in "objects-lite.asn" + * `asn1c -fcompound-names` + */ + +#ifndef _Master_BLS12381_IBE_H_ +#define _Master_BLS12381_IBE_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Master-BLS12381-IBE */ +typedef OCTET_STRING_t Master_BLS12381_IBE_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Master_BLS12381_IBE; +asn_struct_free_f Master_BLS12381_IBE_free; +asn_struct_print_f Master_BLS12381_IBE_print; +asn_constr_check_f Master_BLS12381_IBE_constraint; +ber_type_decoder_f Master_BLS12381_IBE_decode_ber; +der_type_encoder_f Master_BLS12381_IBE_encode_der; +xer_type_decoder_f Master_BLS12381_IBE_decode_xer; +xer_type_encoder_f Master_BLS12381_IBE_encode_xer; +oer_type_decoder_f Master_BLS12381_IBE_decode_oer; +oer_type_encoder_f Master_BLS12381_IBE_encode_oer; +per_type_decoder_f Master_BLS12381_IBE_decode_uper; +per_type_encoder_f Master_BLS12381_IBE_encode_uper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Master_BLS12381_IBE_H_ */ +#include diff --git a/asn1c_files/Master-BLS12381-OAQUE.c b/asn1c_files/Master-BLS12381-OAQUE.c new file mode 100644 index 0000000..29f2d09 --- /dev/null +++ b/asn1c_files/Master-BLS12381-OAQUE.c @@ -0,0 +1,31 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "WAVE-Schema" + * found in "objects-lite.asn" + * `asn1c -fcompound-names` + */ + +#include "Master-BLS12381-OAQUE.h" + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_Master_BLS12381_OAQUE_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Master_BLS12381_OAQUE = { + "Master-BLS12381-OAQUE", + "Master-BLS12381-OAQUE", + &asn_OP_OCTET_STRING, + asn_DEF_Master_BLS12381_OAQUE_tags_1, + sizeof(asn_DEF_Master_BLS12381_OAQUE_tags_1) + /sizeof(asn_DEF_Master_BLS12381_OAQUE_tags_1[0]), /* 1 */ + asn_DEF_Master_BLS12381_OAQUE_tags_1, /* Same as above */ + sizeof(asn_DEF_Master_BLS12381_OAQUE_tags_1) + /sizeof(asn_DEF_Master_BLS12381_OAQUE_tags_1[0]), /* 1 */ + { 0, 0, OCTET_STRING_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/asn1c_files/Master-BLS12381-OAQUE.h b/asn1c_files/Master-BLS12381-OAQUE.h new file mode 100644 index 0000000..3f0936f --- /dev/null +++ b/asn1c_files/Master-BLS12381-OAQUE.h @@ -0,0 +1,43 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "WAVE-Schema" + * found in "objects-lite.asn" + * `asn1c -fcompound-names` + */ + +#ifndef _Master_BLS12381_OAQUE_H_ +#define _Master_BLS12381_OAQUE_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Master-BLS12381-OAQUE */ +typedef OCTET_STRING_t Master_BLS12381_OAQUE_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Master_BLS12381_OAQUE; +asn_struct_free_f Master_BLS12381_OAQUE_free; +asn_struct_print_f Master_BLS12381_OAQUE_print; +asn_constr_check_f Master_BLS12381_OAQUE_constraint; +ber_type_decoder_f Master_BLS12381_OAQUE_decode_ber; +der_type_encoder_f Master_BLS12381_OAQUE_encode_der; +xer_type_decoder_f Master_BLS12381_OAQUE_decode_xer; +xer_type_encoder_f Master_BLS12381_OAQUE_encode_xer; +oer_type_decoder_f Master_BLS12381_OAQUE_decode_oer; +oer_type_encoder_f Master_BLS12381_OAQUE_encode_oer; +per_type_decoder_f Master_BLS12381_OAQUE_decode_uper; +per_type_encoder_f Master_BLS12381_OAQUE_encode_uper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Master_BLS12381_OAQUE_H_ */ +#include diff --git a/asn1c_files/Master-BN256-IBE.c b/asn1c_files/Master-BN256-IBE.c deleted file mode 100644 index 3be8b06..0000000 --- a/asn1c_files/Master-BN256-IBE.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "WAVE-Schema" - * found in "objects-lite.asn" - * `asn1c -fcompound-names` - */ - -#include "Master-BN256-IBE.h" - -/* - * This type is implemented using OCTET_STRING, - * so here we adjust the DEF accordingly. - */ -static const ber_tlv_tag_t asn_DEF_Master_BN256_IBE_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_Master_BN256_IBE = { - "Master-BN256-IBE", - "Master-BN256-IBE", - &asn_OP_OCTET_STRING, - asn_DEF_Master_BN256_IBE_tags_1, - sizeof(asn_DEF_Master_BN256_IBE_tags_1) - /sizeof(asn_DEF_Master_BN256_IBE_tags_1[0]), /* 1 */ - asn_DEF_Master_BN256_IBE_tags_1, /* Same as above */ - sizeof(asn_DEF_Master_BN256_IBE_tags_1) - /sizeof(asn_DEF_Master_BN256_IBE_tags_1[0]), /* 1 */ - { 0, 0, OCTET_STRING_constraint }, - 0, 0, /* No members */ - &asn_SPC_OCTET_STRING_specs /* Additional specs */ -}; - diff --git a/asn1c_files/Master-BN256-IBE.h b/asn1c_files/Master-BN256-IBE.h deleted file mode 100644 index ba91ef7..0000000 --- a/asn1c_files/Master-BN256-IBE.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "WAVE-Schema" - * found in "objects-lite.asn" - * `asn1c -fcompound-names` - */ - -#ifndef _Master_BN256_IBE_H_ -#define _Master_BN256_IBE_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Master-BN256-IBE */ -typedef OCTET_STRING_t Master_BN256_IBE_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Master_BN256_IBE; -asn_struct_free_f Master_BN256_IBE_free; -asn_struct_print_f Master_BN256_IBE_print; -asn_constr_check_f Master_BN256_IBE_constraint; -ber_type_decoder_f Master_BN256_IBE_decode_ber; -der_type_encoder_f Master_BN256_IBE_encode_der; -xer_type_decoder_f Master_BN256_IBE_decode_xer; -xer_type_encoder_f Master_BN256_IBE_encode_xer; -oer_type_decoder_f Master_BN256_IBE_decode_oer; -oer_type_encoder_f Master_BN256_IBE_encode_oer; -per_type_decoder_f Master_BN256_IBE_decode_uper; -per_type_encoder_f Master_BN256_IBE_encode_uper; - -#ifdef __cplusplus -} -#endif - -#endif /* _Master_BN256_IBE_H_ */ -#include diff --git a/asn1c_files/Master-BN256-OAQUE.c b/asn1c_files/Master-BN256-OAQUE.c deleted file mode 100644 index 4242a83..0000000 --- a/asn1c_files/Master-BN256-OAQUE.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "WAVE-Schema" - * found in "objects-lite.asn" - * `asn1c -fcompound-names` - */ - -#include "Master-BN256-OAQUE.h" - -/* - * This type is implemented using OCTET_STRING, - * so here we adjust the DEF accordingly. - */ -static const ber_tlv_tag_t asn_DEF_Master_BN256_OAQUE_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_Master_BN256_OAQUE = { - "Master-BN256-OAQUE", - "Master-BN256-OAQUE", - &asn_OP_OCTET_STRING, - asn_DEF_Master_BN256_OAQUE_tags_1, - sizeof(asn_DEF_Master_BN256_OAQUE_tags_1) - /sizeof(asn_DEF_Master_BN256_OAQUE_tags_1[0]), /* 1 */ - asn_DEF_Master_BN256_OAQUE_tags_1, /* Same as above */ - sizeof(asn_DEF_Master_BN256_OAQUE_tags_1) - /sizeof(asn_DEF_Master_BN256_OAQUE_tags_1[0]), /* 1 */ - { 0, 0, OCTET_STRING_constraint }, - 0, 0, /* No members */ - &asn_SPC_OCTET_STRING_specs /* Additional specs */ -}; - diff --git a/asn1c_files/Master-BN256-OAQUE.h b/asn1c_files/Master-BN256-OAQUE.h deleted file mode 100644 index 4ee9a17..0000000 --- a/asn1c_files/Master-BN256-OAQUE.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "WAVE-Schema" - * found in "objects-lite.asn" - * `asn1c -fcompound-names` - */ - -#ifndef _Master_BN256_OAQUE_H_ -#define _Master_BN256_OAQUE_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Master-BN256-OAQUE */ -typedef OCTET_STRING_t Master_BN256_OAQUE_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Master_BN256_OAQUE; -asn_struct_free_f Master_BN256_OAQUE_free; -asn_struct_print_f Master_BN256_OAQUE_print; -asn_constr_check_f Master_BN256_OAQUE_constraint; -ber_type_decoder_f Master_BN256_OAQUE_decode_ber; -der_type_encoder_f Master_BN256_OAQUE_encode_der; -xer_type_decoder_f Master_BN256_OAQUE_decode_xer; -xer_type_encoder_f Master_BN256_OAQUE_encode_xer; -oer_type_decoder_f Master_BN256_OAQUE_decode_oer; -oer_type_encoder_f Master_BN256_OAQUE_encode_oer; -per_type_decoder_f Master_BN256_OAQUE_decode_uper; -per_type_encoder_f Master_BN256_OAQUE_encode_uper; - -#ifdef __cplusplus -} -#endif - -#endif /* _Master_BN256_OAQUE_H_ */ -#include diff --git a/asn1c_files/MessageKeyWR1.c b/asn1c_files/MessageKeyWR1.c index 61aca32..8c2fad4 100644 --- a/asn1c_files/MessageKeyWR1.c +++ b/asn1c_files/MessageKeyWR1.c @@ -17,14 +17,14 @@ static asn_TYPE_member_t asn_MBR_MessageKeyWR1_1[] = { 0, 0, /* No default value */ "envelope" }, - { ATF_NOFLAGS, 0, offsetof(struct MessageKeyWR1, envelopeKey_ibe_bn256), + { ATF_NOFLAGS, 0, offsetof(struct MessageKeyWR1, envelopeKey_ibe_BLS12381), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_OCTET_STRING, 0, { 0, 0, 0 }, 0, 0, /* No default value */ - "envelopeKey-ibe-bn256" + "envelopeKey-ibe-BLS12381" }, { ATF_NOFLAGS, 0, offsetof(struct MessageKeyWR1, Namespace), (ASN_TAG_CLASS_UNIVERSAL | (8 << 2)), @@ -50,7 +50,7 @@ static const ber_tlv_tag_t asn_DEF_MessageKeyWR1_tags_1[] = { }; static const asn_TYPE_tag2member_t asn_MAP_MessageKeyWR1_tag2el_1[] = { { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 1 }, /* envelope */ - { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, -1, 0 }, /* envelopeKey-ibe-bn256 */ + { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, -1, 0 }, /* envelopeKey-ibe-BLS12381 */ { (ASN_TAG_CLASS_UNIVERSAL | (8 << 2)), 2, 0, 1 }, /* namespace */ { (ASN_TAG_CLASS_UNIVERSAL | (8 << 2)), 3, -1, 0 } /* namespaceLocation */ }; diff --git a/asn1c_files/MessageKeyWR1.h b/asn1c_files/MessageKeyWR1.h index 0095210..c422979 100644 --- a/asn1c_files/MessageKeyWR1.h +++ b/asn1c_files/MessageKeyWR1.h @@ -24,7 +24,7 @@ extern "C" { /* MessageKeyWR1 */ typedef struct MessageKeyWR1 { OCTET_STRING_t envelope; - OCTET_STRING_t envelopeKey_ibe_bn256; + OCTET_STRING_t envelopeKey_ibe_BLS12381; EntityHash_t Namespace; Location_t namespaceLocation; diff --git a/asn1c_files/NameDeclarationKeyWR1.c b/asn1c_files/NameDeclarationKeyWR1.c index 0fbca03..9266cce 100644 --- a/asn1c_files/NameDeclarationKeyWR1.c +++ b/asn1c_files/NameDeclarationKeyWR1.c @@ -17,14 +17,14 @@ static asn_TYPE_member_t asn_MBR_NameDeclarationKeyWR1_1[] = { 0, 0, /* No default value */ "envelope" }, - { ATF_NOFLAGS, 0, offsetof(struct NameDeclarationKeyWR1, envelopeKey_ibe_bn256), + { ATF_NOFLAGS, 0, offsetof(struct NameDeclarationKeyWR1, envelopeKey_ibe_BLS12381), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_OCTET_STRING, 0, { 0, 0, 0 }, 0, 0, /* No default value */ - "envelopeKey-ibe-bn256" + "envelopeKey-ibe-BLS12381" }, { ATF_NOFLAGS, 0, offsetof(struct NameDeclarationKeyWR1, Namespace), (ASN_TAG_CLASS_UNIVERSAL | (8 << 2)), @@ -50,7 +50,7 @@ static const ber_tlv_tag_t asn_DEF_NameDeclarationKeyWR1_tags_1[] = { }; static const asn_TYPE_tag2member_t asn_MAP_NameDeclarationKeyWR1_tag2el_1[] = { { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 1 }, /* envelope */ - { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, -1, 0 }, /* envelopeKey-ibe-bn256 */ + { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, -1, 0 }, /* envelopeKey-ibe-BLS12381 */ { (ASN_TAG_CLASS_UNIVERSAL | (8 << 2)), 2, 0, 1 }, /* namespace */ { (ASN_TAG_CLASS_UNIVERSAL | (8 << 2)), 3, -1, 0 } /* namespaceLocation */ }; diff --git a/asn1c_files/NameDeclarationKeyWR1.h b/asn1c_files/NameDeclarationKeyWR1.h index 9cc39bb..66e335e 100644 --- a/asn1c_files/NameDeclarationKeyWR1.h +++ b/asn1c_files/NameDeclarationKeyWR1.h @@ -24,7 +24,7 @@ extern "C" { /* NameDeclarationKeyWR1 */ typedef struct NameDeclarationKeyWR1 { OCTET_STRING_t envelope; - OCTET_STRING_t envelopeKey_ibe_bn256; + OCTET_STRING_t envelopeKey_ibe_BLS12381; EntityHash_t Namespace; Location_t namespaceLocation; diff --git a/asn1c_files/Params-BLS12381-IBE.c b/asn1c_files/Params-BLS12381-IBE.c new file mode 100644 index 0000000..e26a1f9 --- /dev/null +++ b/asn1c_files/Params-BLS12381-IBE.c @@ -0,0 +1,31 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "WAVE-Schema" + * found in "objects-lite.asn" + * `asn1c -fcompound-names` + */ + +#include "Params-BLS12381-IBE.h" + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_Params_BLS12381_IBE_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Params_BLS12381_IBE = { + "Params-BLS12381-IBE", + "Params-BLS12381-IBE", + &asn_OP_OCTET_STRING, + asn_DEF_Params_BLS12381_IBE_tags_1, + sizeof(asn_DEF_Params_BLS12381_IBE_tags_1) + /sizeof(asn_DEF_Params_BLS12381_IBE_tags_1[0]), /* 1 */ + asn_DEF_Params_BLS12381_IBE_tags_1, /* Same as above */ + sizeof(asn_DEF_Params_BLS12381_IBE_tags_1) + /sizeof(asn_DEF_Params_BLS12381_IBE_tags_1[0]), /* 1 */ + { 0, 0, OCTET_STRING_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/asn1c_files/Params-BLS12381-IBE.h b/asn1c_files/Params-BLS12381-IBE.h new file mode 100644 index 0000000..eef431f --- /dev/null +++ b/asn1c_files/Params-BLS12381-IBE.h @@ -0,0 +1,43 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "WAVE-Schema" + * found in "objects-lite.asn" + * `asn1c -fcompound-names` + */ + +#ifndef _Params_BLS12381_IBE_H_ +#define _Params_BLS12381_IBE_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Params-BLS12381-IBE */ +typedef OCTET_STRING_t Params_BLS12381_IBE_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Params_BLS12381_IBE; +asn_struct_free_f Params_BLS12381_IBE_free; +asn_struct_print_f Params_BLS12381_IBE_print; +asn_constr_check_f Params_BLS12381_IBE_constraint; +ber_type_decoder_f Params_BLS12381_IBE_decode_ber; +der_type_encoder_f Params_BLS12381_IBE_encode_der; +xer_type_decoder_f Params_BLS12381_IBE_decode_xer; +xer_type_encoder_f Params_BLS12381_IBE_encode_xer; +oer_type_decoder_f Params_BLS12381_IBE_decode_oer; +oer_type_encoder_f Params_BLS12381_IBE_encode_oer; +per_type_decoder_f Params_BLS12381_IBE_decode_uper; +per_type_encoder_f Params_BLS12381_IBE_encode_uper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Params_BLS12381_IBE_H_ */ +#include diff --git a/asn1c_files/Params-BLS12381-OAQUE.c b/asn1c_files/Params-BLS12381-OAQUE.c new file mode 100644 index 0000000..29cfe0b --- /dev/null +++ b/asn1c_files/Params-BLS12381-OAQUE.c @@ -0,0 +1,31 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "WAVE-Schema" + * found in "objects-lite.asn" + * `asn1c -fcompound-names` + */ + +#include "Params-BLS12381-OAQUE.h" + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_Params_BLS12381_OAQUE_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Params_BLS12381_OAQUE = { + "Params-BLS12381-OAQUE", + "Params-BLS12381-OAQUE", + &asn_OP_OCTET_STRING, + asn_DEF_Params_BLS12381_OAQUE_tags_1, + sizeof(asn_DEF_Params_BLS12381_OAQUE_tags_1) + /sizeof(asn_DEF_Params_BLS12381_OAQUE_tags_1[0]), /* 1 */ + asn_DEF_Params_BLS12381_OAQUE_tags_1, /* Same as above */ + sizeof(asn_DEF_Params_BLS12381_OAQUE_tags_1) + /sizeof(asn_DEF_Params_BLS12381_OAQUE_tags_1[0]), /* 1 */ + { 0, 0, OCTET_STRING_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/asn1c_files/Params-BLS12381-OAQUE.h b/asn1c_files/Params-BLS12381-OAQUE.h new file mode 100644 index 0000000..0402132 --- /dev/null +++ b/asn1c_files/Params-BLS12381-OAQUE.h @@ -0,0 +1,43 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "WAVE-Schema" + * found in "objects-lite.asn" + * `asn1c -fcompound-names` + */ + +#ifndef _Params_BLS12381_OAQUE_H_ +#define _Params_BLS12381_OAQUE_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Params-BLS12381-OAQUE */ +typedef OCTET_STRING_t Params_BLS12381_OAQUE_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Params_BLS12381_OAQUE; +asn_struct_free_f Params_BLS12381_OAQUE_free; +asn_struct_print_f Params_BLS12381_OAQUE_print; +asn_constr_check_f Params_BLS12381_OAQUE_constraint; +ber_type_decoder_f Params_BLS12381_OAQUE_decode_ber; +der_type_encoder_f Params_BLS12381_OAQUE_encode_der; +xer_type_decoder_f Params_BLS12381_OAQUE_decode_xer; +xer_type_encoder_f Params_BLS12381_OAQUE_encode_xer; +oer_type_decoder_f Params_BLS12381_OAQUE_decode_oer; +oer_type_encoder_f Params_BLS12381_OAQUE_encode_oer; +per_type_decoder_f Params_BLS12381_OAQUE_decode_uper; +per_type_encoder_f Params_BLS12381_OAQUE_encode_uper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Params_BLS12381_OAQUE_H_ */ +#include diff --git a/asn1c_files/Params-BN256-IBE.c b/asn1c_files/Params-BN256-IBE.c deleted file mode 100644 index 287d337..0000000 --- a/asn1c_files/Params-BN256-IBE.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "WAVE-Schema" - * found in "objects-lite.asn" - * `asn1c -fcompound-names` - */ - -#include "Params-BN256-IBE.h" - -/* - * This type is implemented using OCTET_STRING, - * so here we adjust the DEF accordingly. - */ -static const ber_tlv_tag_t asn_DEF_Params_BN256_IBE_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_Params_BN256_IBE = { - "Params-BN256-IBE", - "Params-BN256-IBE", - &asn_OP_OCTET_STRING, - asn_DEF_Params_BN256_IBE_tags_1, - sizeof(asn_DEF_Params_BN256_IBE_tags_1) - /sizeof(asn_DEF_Params_BN256_IBE_tags_1[0]), /* 1 */ - asn_DEF_Params_BN256_IBE_tags_1, /* Same as above */ - sizeof(asn_DEF_Params_BN256_IBE_tags_1) - /sizeof(asn_DEF_Params_BN256_IBE_tags_1[0]), /* 1 */ - { 0, 0, OCTET_STRING_constraint }, - 0, 0, /* No members */ - &asn_SPC_OCTET_STRING_specs /* Additional specs */ -}; - diff --git a/asn1c_files/Params-BN256-IBE.h b/asn1c_files/Params-BN256-IBE.h deleted file mode 100644 index bc058d9..0000000 --- a/asn1c_files/Params-BN256-IBE.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "WAVE-Schema" - * found in "objects-lite.asn" - * `asn1c -fcompound-names` - */ - -#ifndef _Params_BN256_IBE_H_ -#define _Params_BN256_IBE_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Params-BN256-IBE */ -typedef OCTET_STRING_t Params_BN256_IBE_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Params_BN256_IBE; -asn_struct_free_f Params_BN256_IBE_free; -asn_struct_print_f Params_BN256_IBE_print; -asn_constr_check_f Params_BN256_IBE_constraint; -ber_type_decoder_f Params_BN256_IBE_decode_ber; -der_type_encoder_f Params_BN256_IBE_encode_der; -xer_type_decoder_f Params_BN256_IBE_decode_xer; -xer_type_encoder_f Params_BN256_IBE_encode_xer; -oer_type_decoder_f Params_BN256_IBE_decode_oer; -oer_type_encoder_f Params_BN256_IBE_encode_oer; -per_type_decoder_f Params_BN256_IBE_decode_uper; -per_type_encoder_f Params_BN256_IBE_encode_uper; - -#ifdef __cplusplus -} -#endif - -#endif /* _Params_BN256_IBE_H_ */ -#include diff --git a/asn1c_files/Params-BN256-OAQUE.c b/asn1c_files/Params-BN256-OAQUE.c deleted file mode 100644 index b40de08..0000000 --- a/asn1c_files/Params-BN256-OAQUE.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "WAVE-Schema" - * found in "objects-lite.asn" - * `asn1c -fcompound-names` - */ - -#include "Params-BN256-OAQUE.h" - -/* - * This type is implemented using OCTET_STRING, - * so here we adjust the DEF accordingly. - */ -static const ber_tlv_tag_t asn_DEF_Params_BN256_OAQUE_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_Params_BN256_OAQUE = { - "Params-BN256-OAQUE", - "Params-BN256-OAQUE", - &asn_OP_OCTET_STRING, - asn_DEF_Params_BN256_OAQUE_tags_1, - sizeof(asn_DEF_Params_BN256_OAQUE_tags_1) - /sizeof(asn_DEF_Params_BN256_OAQUE_tags_1[0]), /* 1 */ - asn_DEF_Params_BN256_OAQUE_tags_1, /* Same as above */ - sizeof(asn_DEF_Params_BN256_OAQUE_tags_1) - /sizeof(asn_DEF_Params_BN256_OAQUE_tags_1[0]), /* 1 */ - { 0, 0, OCTET_STRING_constraint }, - 0, 0, /* No members */ - &asn_SPC_OCTET_STRING_specs /* Additional specs */ -}; - diff --git a/asn1c_files/Params-BN256-OAQUE.h b/asn1c_files/Params-BN256-OAQUE.h deleted file mode 100644 index c59a51a..0000000 --- a/asn1c_files/Params-BN256-OAQUE.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "WAVE-Schema" - * found in "objects-lite.asn" - * `asn1c -fcompound-names` - */ - -#ifndef _Params_BN256_OAQUE_H_ -#define _Params_BN256_OAQUE_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Params-BN256-OAQUE */ -typedef OCTET_STRING_t Params_BN256_OAQUE_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Params_BN256_OAQUE; -asn_struct_free_f Params_BN256_OAQUE_free; -asn_struct_print_f Params_BN256_OAQUE_print; -asn_constr_check_f Params_BN256_OAQUE_constraint; -ber_type_decoder_f Params_BN256_OAQUE_decode_ber; -der_type_encoder_f Params_BN256_OAQUE_encode_der; -xer_type_decoder_f Params_BN256_OAQUE_decode_xer; -xer_type_encoder_f Params_BN256_OAQUE_encode_xer; -oer_type_decoder_f Params_BN256_OAQUE_decode_oer; -oer_type_encoder_f Params_BN256_OAQUE_encode_oer; -per_type_decoder_f Params_BN256_OAQUE_decode_uper; -per_type_encoder_f Params_BN256_OAQUE_encode_uper; - -#ifdef __cplusplus -} -#endif - -#endif /* _Params_BN256_OAQUE_H_ */ -#include diff --git a/asn1c_files/Private-BLS12381-IBE.c b/asn1c_files/Private-BLS12381-IBE.c new file mode 100644 index 0000000..05f9f94 --- /dev/null +++ b/asn1c_files/Private-BLS12381-IBE.c @@ -0,0 +1,31 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "WAVE-Schema" + * found in "objects-lite.asn" + * `asn1c -fcompound-names` + */ + +#include "Private-BLS12381-IBE.h" + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_Private_BLS12381_IBE_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Private_BLS12381_IBE = { + "Private-BLS12381-IBE", + "Private-BLS12381-IBE", + &asn_OP_OCTET_STRING, + asn_DEF_Private_BLS12381_IBE_tags_1, + sizeof(asn_DEF_Private_BLS12381_IBE_tags_1) + /sizeof(asn_DEF_Private_BLS12381_IBE_tags_1[0]), /* 1 */ + asn_DEF_Private_BLS12381_IBE_tags_1, /* Same as above */ + sizeof(asn_DEF_Private_BLS12381_IBE_tags_1) + /sizeof(asn_DEF_Private_BLS12381_IBE_tags_1[0]), /* 1 */ + { 0, 0, OCTET_STRING_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/asn1c_files/Private-BLS12381-IBE.h b/asn1c_files/Private-BLS12381-IBE.h new file mode 100644 index 0000000..8d9821b --- /dev/null +++ b/asn1c_files/Private-BLS12381-IBE.h @@ -0,0 +1,43 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "WAVE-Schema" + * found in "objects-lite.asn" + * `asn1c -fcompound-names` + */ + +#ifndef _Private_BLS12381_IBE_H_ +#define _Private_BLS12381_IBE_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Private-BLS12381-IBE */ +typedef OCTET_STRING_t Private_BLS12381_IBE_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Private_BLS12381_IBE; +asn_struct_free_f Private_BLS12381_IBE_free; +asn_struct_print_f Private_BLS12381_IBE_print; +asn_constr_check_f Private_BLS12381_IBE_constraint; +ber_type_decoder_f Private_BLS12381_IBE_decode_ber; +der_type_encoder_f Private_BLS12381_IBE_encode_der; +xer_type_decoder_f Private_BLS12381_IBE_decode_xer; +xer_type_encoder_f Private_BLS12381_IBE_encode_xer; +oer_type_decoder_f Private_BLS12381_IBE_decode_oer; +oer_type_encoder_f Private_BLS12381_IBE_encode_oer; +per_type_decoder_f Private_BLS12381_IBE_decode_uper; +per_type_encoder_f Private_BLS12381_IBE_encode_uper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Private_BLS12381_IBE_H_ */ +#include diff --git a/asn1c_files/Private-BLS12381-OAQUE.c b/asn1c_files/Private-BLS12381-OAQUE.c new file mode 100644 index 0000000..42587aa --- /dev/null +++ b/asn1c_files/Private-BLS12381-OAQUE.c @@ -0,0 +1,31 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "WAVE-Schema" + * found in "objects-lite.asn" + * `asn1c -fcompound-names` + */ + +#include "Private-BLS12381-OAQUE.h" + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_Private_BLS12381_OAQUE_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Private_BLS12381_OAQUE = { + "Private-BLS12381-OAQUE", + "Private-BLS12381-OAQUE", + &asn_OP_OCTET_STRING, + asn_DEF_Private_BLS12381_OAQUE_tags_1, + sizeof(asn_DEF_Private_BLS12381_OAQUE_tags_1) + /sizeof(asn_DEF_Private_BLS12381_OAQUE_tags_1[0]), /* 1 */ + asn_DEF_Private_BLS12381_OAQUE_tags_1, /* Same as above */ + sizeof(asn_DEF_Private_BLS12381_OAQUE_tags_1) + /sizeof(asn_DEF_Private_BLS12381_OAQUE_tags_1[0]), /* 1 */ + { 0, 0, OCTET_STRING_constraint }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/asn1c_files/Private-BLS12381-OAQUE.h b/asn1c_files/Private-BLS12381-OAQUE.h new file mode 100644 index 0000000..897473f --- /dev/null +++ b/asn1c_files/Private-BLS12381-OAQUE.h @@ -0,0 +1,43 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "WAVE-Schema" + * found in "objects-lite.asn" + * `asn1c -fcompound-names` + */ + +#ifndef _Private_BLS12381_OAQUE_H_ +#define _Private_BLS12381_OAQUE_H_ + + +#include + +/* Including external dependencies */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Private-BLS12381-OAQUE */ +typedef OCTET_STRING_t Private_BLS12381_OAQUE_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Private_BLS12381_OAQUE; +asn_struct_free_f Private_BLS12381_OAQUE_free; +asn_struct_print_f Private_BLS12381_OAQUE_print; +asn_constr_check_f Private_BLS12381_OAQUE_constraint; +ber_type_decoder_f Private_BLS12381_OAQUE_decode_ber; +der_type_encoder_f Private_BLS12381_OAQUE_encode_der; +xer_type_decoder_f Private_BLS12381_OAQUE_decode_xer; +xer_type_encoder_f Private_BLS12381_OAQUE_encode_xer; +oer_type_decoder_f Private_BLS12381_OAQUE_decode_oer; +oer_type_encoder_f Private_BLS12381_OAQUE_encode_oer; +per_type_decoder_f Private_BLS12381_OAQUE_decode_uper; +per_type_encoder_f Private_BLS12381_OAQUE_encode_uper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Private_BLS12381_OAQUE_H_ */ +#include diff --git a/asn1c_files/Private-BN256-IBE.c b/asn1c_files/Private-BN256-IBE.c deleted file mode 100644 index 2ad412b..0000000 --- a/asn1c_files/Private-BN256-IBE.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "WAVE-Schema" - * found in "objects-lite.asn" - * `asn1c -fcompound-names` - */ - -#include "Private-BN256-IBE.h" - -/* - * This type is implemented using OCTET_STRING, - * so here we adjust the DEF accordingly. - */ -static const ber_tlv_tag_t asn_DEF_Private_BN256_IBE_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_Private_BN256_IBE = { - "Private-BN256-IBE", - "Private-BN256-IBE", - &asn_OP_OCTET_STRING, - asn_DEF_Private_BN256_IBE_tags_1, - sizeof(asn_DEF_Private_BN256_IBE_tags_1) - /sizeof(asn_DEF_Private_BN256_IBE_tags_1[0]), /* 1 */ - asn_DEF_Private_BN256_IBE_tags_1, /* Same as above */ - sizeof(asn_DEF_Private_BN256_IBE_tags_1) - /sizeof(asn_DEF_Private_BN256_IBE_tags_1[0]), /* 1 */ - { 0, 0, OCTET_STRING_constraint }, - 0, 0, /* No members */ - &asn_SPC_OCTET_STRING_specs /* Additional specs */ -}; - diff --git a/asn1c_files/Private-BN256-IBE.h b/asn1c_files/Private-BN256-IBE.h deleted file mode 100644 index 8eec444..0000000 --- a/asn1c_files/Private-BN256-IBE.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "WAVE-Schema" - * found in "objects-lite.asn" - * `asn1c -fcompound-names` - */ - -#ifndef _Private_BN256_IBE_H_ -#define _Private_BN256_IBE_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Private-BN256-IBE */ -typedef OCTET_STRING_t Private_BN256_IBE_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Private_BN256_IBE; -asn_struct_free_f Private_BN256_IBE_free; -asn_struct_print_f Private_BN256_IBE_print; -asn_constr_check_f Private_BN256_IBE_constraint; -ber_type_decoder_f Private_BN256_IBE_decode_ber; -der_type_encoder_f Private_BN256_IBE_encode_der; -xer_type_decoder_f Private_BN256_IBE_decode_xer; -xer_type_encoder_f Private_BN256_IBE_encode_xer; -oer_type_decoder_f Private_BN256_IBE_decode_oer; -oer_type_encoder_f Private_BN256_IBE_encode_oer; -per_type_decoder_f Private_BN256_IBE_decode_uper; -per_type_encoder_f Private_BN256_IBE_encode_uper; - -#ifdef __cplusplus -} -#endif - -#endif /* _Private_BN256_IBE_H_ */ -#include diff --git a/asn1c_files/Private-BN256-OAQUE.c b/asn1c_files/Private-BN256-OAQUE.c deleted file mode 100644 index 4d6187f..0000000 --- a/asn1c_files/Private-BN256-OAQUE.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "WAVE-Schema" - * found in "objects-lite.asn" - * `asn1c -fcompound-names` - */ - -#include "Private-BN256-OAQUE.h" - -/* - * This type is implemented using OCTET_STRING, - * so here we adjust the DEF accordingly. - */ -static const ber_tlv_tag_t asn_DEF_Private_BN256_OAQUE_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_Private_BN256_OAQUE = { - "Private-BN256-OAQUE", - "Private-BN256-OAQUE", - &asn_OP_OCTET_STRING, - asn_DEF_Private_BN256_OAQUE_tags_1, - sizeof(asn_DEF_Private_BN256_OAQUE_tags_1) - /sizeof(asn_DEF_Private_BN256_OAQUE_tags_1[0]), /* 1 */ - asn_DEF_Private_BN256_OAQUE_tags_1, /* Same as above */ - sizeof(asn_DEF_Private_BN256_OAQUE_tags_1) - /sizeof(asn_DEF_Private_BN256_OAQUE_tags_1[0]), /* 1 */ - { 0, 0, OCTET_STRING_constraint }, - 0, 0, /* No members */ - &asn_SPC_OCTET_STRING_specs /* Additional specs */ -}; - diff --git a/asn1c_files/Private-BN256-OAQUE.h b/asn1c_files/Private-BN256-OAQUE.h deleted file mode 100644 index 6891e52..0000000 --- a/asn1c_files/Private-BN256-OAQUE.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "WAVE-Schema" - * found in "objects-lite.asn" - * `asn1c -fcompound-names` - */ - -#ifndef _Private_BN256_OAQUE_H_ -#define _Private_BN256_OAQUE_H_ - - -#include - -/* Including external dependencies */ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Private-BN256-OAQUE */ -typedef OCTET_STRING_t Private_BN256_OAQUE_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Private_BN256_OAQUE; -asn_struct_free_f Private_BN256_OAQUE_free; -asn_struct_print_f Private_BN256_OAQUE_print; -asn_constr_check_f Private_BN256_OAQUE_constraint; -ber_type_decoder_f Private_BN256_OAQUE_decode_ber; -der_type_encoder_f Private_BN256_OAQUE_encode_der; -xer_type_decoder_f Private_BN256_OAQUE_decode_xer; -xer_type_encoder_f Private_BN256_OAQUE_encode_xer; -oer_type_decoder_f Private_BN256_OAQUE_decode_oer; -oer_type_encoder_f Private_BN256_OAQUE_encode_oer; -per_type_decoder_f Private_BN256_OAQUE_decode_uper; -per_type_encoder_f Private_BN256_OAQUE_encode_uper; - -#ifdef __cplusplus -} -#endif - -#endif /* _Private_BN256_OAQUE_H_ */ -#include diff --git a/asn1c_files/Public-BLS12381-IBE.c b/asn1c_files/Public-BLS12381-IBE.c new file mode 100644 index 0000000..ebff49a --- /dev/null +++ b/asn1c_files/Public-BLS12381-IBE.c @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "WAVE-Schema" + * found in "objects-lite.asn" + * `asn1c -fcompound-names` + */ + +#include "Public-BLS12381-IBE.h" + +static asn_TYPE_member_t asn_MBR_Public_BLS12381_IBE_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Public_BLS12381_IBE, params), + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_Params_BLS12381_IBE, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "params" + }, + { ATF_NOFLAGS, 0, offsetof(struct Public_BLS12381_IBE, id), + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_OCTET_STRING, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "id" + }, +}; +static const ber_tlv_tag_t asn_DEF_Public_BLS12381_IBE_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Public_BLS12381_IBE_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 1 }, /* params */ + { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, -1, 0 } /* id */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_Public_BLS12381_IBE_specs_1 = { + sizeof(struct Public_BLS12381_IBE), + offsetof(struct Public_BLS12381_IBE, _asn_ctx), + asn_MAP_Public_BLS12381_IBE_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Public_BLS12381_IBE = { + "Public-BLS12381-IBE", + "Public-BLS12381-IBE", + &asn_OP_SEQUENCE, + asn_DEF_Public_BLS12381_IBE_tags_1, + sizeof(asn_DEF_Public_BLS12381_IBE_tags_1) + /sizeof(asn_DEF_Public_BLS12381_IBE_tags_1[0]), /* 1 */ + asn_DEF_Public_BLS12381_IBE_tags_1, /* Same as above */ + sizeof(asn_DEF_Public_BLS12381_IBE_tags_1) + /sizeof(asn_DEF_Public_BLS12381_IBE_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_Public_BLS12381_IBE_1, + 2, /* Elements count */ + &asn_SPC_Public_BLS12381_IBE_specs_1 /* Additional specs */ +}; + diff --git a/asn1c_files/Public-BN256-IBE.h b/asn1c_files/Public-BLS12381-IBE.h similarity index 61% rename from asn1c_files/Public-BN256-IBE.h rename to asn1c_files/Public-BLS12381-IBE.h index 854cc51..852f715 100644 --- a/asn1c_files/Public-BN256-IBE.h +++ b/asn1c_files/Public-BLS12381-IBE.h @@ -5,14 +5,14 @@ * `asn1c -fcompound-names` */ -#ifndef _Public_BN256_IBE_H_ -#define _Public_BN256_IBE_H_ +#ifndef _Public_BLS12381_IBE_H_ +#define _Public_BLS12381_IBE_H_ #include /* Including external dependencies */ -#include "Params-BN256-IBE.h" +#include "Params-BLS12381-IBE.h" #include #include @@ -20,21 +20,21 @@ extern "C" { #endif -/* Public-BN256-IBE */ -typedef struct Public_BN256_IBE { - Params_BN256_IBE_t params; +/* Public-BLS12381-IBE */ +typedef struct Public_BLS12381_IBE { + Params_BLS12381_IBE_t params; OCTET_STRING_t id; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; -} Public_BN256_IBE_t; +} Public_BLS12381_IBE_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Public_BN256_IBE; +extern asn_TYPE_descriptor_t asn_DEF_Public_BLS12381_IBE; #ifdef __cplusplus } #endif -#endif /* _Public_BN256_IBE_H_ */ +#endif /* _Public_BLS12381_IBE_H_ */ #include diff --git a/asn1c_files/Public-BN256-IBE.c b/asn1c_files/Public-BN256-IBE.c deleted file mode 100644 index 5d4f125..0000000 --- a/asn1c_files/Public-BN256-IBE.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) - * From ASN.1 module "WAVE-Schema" - * found in "objects-lite.asn" - * `asn1c -fcompound-names` - */ - -#include "Public-BN256-IBE.h" - -static asn_TYPE_member_t asn_MBR_Public_BN256_IBE_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct Public_BN256_IBE, params), - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), - 0, - &asn_DEF_Params_BN256_IBE, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "params" - }, - { ATF_NOFLAGS, 0, offsetof(struct Public_BN256_IBE, id), - (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), - 0, - &asn_DEF_OCTET_STRING, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "id" - }, -}; -static const ber_tlv_tag_t asn_DEF_Public_BN256_IBE_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_Public_BN256_IBE_tag2el_1[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 1 }, /* params */ - { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, -1, 0 } /* id */ -}; -static asn_SEQUENCE_specifics_t asn_SPC_Public_BN256_IBE_specs_1 = { - sizeof(struct Public_BN256_IBE), - offsetof(struct Public_BN256_IBE, _asn_ctx), - asn_MAP_Public_BN256_IBE_tag2el_1, - 2, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_Public_BN256_IBE = { - "Public-BN256-IBE", - "Public-BN256-IBE", - &asn_OP_SEQUENCE, - asn_DEF_Public_BN256_IBE_tags_1, - sizeof(asn_DEF_Public_BN256_IBE_tags_1) - /sizeof(asn_DEF_Public_BN256_IBE_tags_1[0]), /* 1 */ - asn_DEF_Public_BN256_IBE_tags_1, /* Same as above */ - sizeof(asn_DEF_Public_BN256_IBE_tags_1) - /sizeof(asn_DEF_Public_BN256_IBE_tags_1[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_Public_BN256_IBE_1, - 2, /* Elements count */ - &asn_SPC_Public_BN256_IBE_specs_1 /* Additional specs */ -}; - diff --git a/asn1c_files/Public-OAQUE.c b/asn1c_files/Public-OAQUE.c index f17e40c..59e6108 100644 --- a/asn1c_files/Public-OAQUE.c +++ b/asn1c_files/Public-OAQUE.c @@ -47,7 +47,7 @@ static asn_TYPE_member_t asn_MBR_Public_OAQUE_1[] = { { ATF_NOFLAGS, 0, offsetof(struct Public_OAQUE, params), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, - &asn_DEF_Params_BN256_OAQUE, + &asn_DEF_Params_BLS12381_OAQUE, 0, { 0, 0, 0 }, 0, 0, /* No default value */ diff --git a/asn1c_files/Public-OAQUE.h b/asn1c_files/Public-OAQUE.h index 14d9de0..4201df6 100644 --- a/asn1c_files/Public-OAQUE.h +++ b/asn1c_files/Public-OAQUE.h @@ -12,7 +12,7 @@ #include /* Including external dependencies */ -#include "Params-BN256-OAQUE.h" +#include "Params-BLS12381-OAQUE.h" #include #include #include @@ -24,7 +24,7 @@ extern "C" { /* Public-OAQUE */ typedef struct Public_OAQUE { - Params_BN256_OAQUE_t params; + Params_BLS12381_OAQUE_t params; struct Public_OAQUE__attributeset { A_SEQUENCE_OF(OCTET_STRING_t) list; diff --git a/asn1c_files/WR1BodyCiphertext.c b/asn1c_files/WR1BodyCiphertext.c index c26a50b..f2e5575 100644 --- a/asn1c_files/WR1BodyCiphertext.c +++ b/asn1c_files/WR1BodyCiphertext.c @@ -35,14 +35,14 @@ static asn_TYPE_member_t asn_MBR_WR1BodyCiphertext_1[] = { 0, 0, /* No default value */ "envelopeCiphertext" }, - { ATF_NOFLAGS, 0, offsetof(struct WR1BodyCiphertext, envelopeKey_ibe_bn256), + { ATF_NOFLAGS, 0, offsetof(struct WR1BodyCiphertext, envelopeKey_ibe_BLS12381), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_OCTET_STRING, 0, { 0, 0, 0 }, 0, 0, /* No default value */ - "envelopeKey-ibe-bn256" + "envelopeKey-ibe-BLS12381" }, { ATF_NOFLAGS, 0, offsetof(struct WR1BodyCiphertext, envelopeKey_curve25519), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), @@ -70,7 +70,7 @@ static const asn_TYPE_tag2member_t asn_MAP_WR1BodyCiphertext_tag2el_1[] = { { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 5 }, /* verifierBodyCiphertext */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, -1, 4 }, /* proverBodyCiphertext */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 2, -2, 3 }, /* envelopeCiphertext */ - { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 3, -3, 2 }, /* envelopeKey-ibe-bn256 */ + { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 3, -3, 2 }, /* envelopeKey-ibe-BLS12381 */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 4, -4, 1 }, /* envelopeKey-curve25519 */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 5, -5, 0 } /* envelopeKey-curve25519-attester */ }; diff --git a/asn1c_files/WR1BodyCiphertext.h b/asn1c_files/WR1BodyCiphertext.h index dd19c72..fe65ac8 100644 --- a/asn1c_files/WR1BodyCiphertext.h +++ b/asn1c_files/WR1BodyCiphertext.h @@ -24,7 +24,7 @@ typedef struct WR1BodyCiphertext { OCTET_STRING_t verifierBodyCiphertext; OCTET_STRING_t proverBodyCiphertext; OCTET_STRING_t envelopeCiphertext; - OCTET_STRING_t envelopeKey_ibe_bn256; + OCTET_STRING_t envelopeKey_ibe_BLS12381; OCTET_STRING_t envelopeKey_curve25519; OCTET_STRING_t envelopeKey_curve25519_attester; diff --git a/asn1c_files/converter-example.mk b/asn1c_files/converter-example.mk index 8dea781..608a0ef 100644 --- a/asn1c_files/converter-example.mk +++ b/asn1c_files/converter-example.mk @@ -29,5 +29,5 @@ clean: regen: regenerate-from-asn1-source regenerate-from-asn1-source: - /usr/local/bin/asn1c -fcompound-names objects-lite.asn + asn1c -fcompound-names objects-lite.asn diff --git a/asn1c_files/objects-lite.asn b/asn1c_files/objects-lite.asn index 8fc9f41..f618af1 100644 --- a/asn1c_files/objects-lite.asn +++ b/asn1c_files/objects-lite.asn @@ -167,17 +167,17 @@ BEGIN secret EntityPrivateKey } - BN256OAQUEKeyringBundle ::= SEQUENCE { - params Params-BN256-OAQUE, - entries SEQUENCE OF BN256OAQUEBundleEntry + BLS12381OAQUEKeyringBundle ::= SEQUENCE { + params Params-BLS12381-OAQUE, + entries SEQUENCE OF BLS12381OAQUEBundleEntry } - BN256OAQUEBundleEntry ::= SEQUENCE { + BLS12381OAQUEBundleEntry ::= SEQUENCE { partitionChange SEQUENCE OF SEQUENCE { index INTEGER, content OCTET STRING }, - key Private-BN256-OAQUE + key Private-BLS12381-OAQUE } EntityPrivateKey ::= EXTERNAL @@ -348,9 +348,9 @@ BEGIN envelope OCTET STRING, -- content envelopeKey - -- encryption algorithm: IBE-bn256 in declaration namespace system + -- encryption algorithm: IBE-BLS12381 in declaration namespace system -- id: envelopeID (namespace) - envelopeKey-ibe-bn256 OCTET STRING, + envelopeKey-ibe-BLS12381 OCTET STRING, namespace EntityHash, namespaceLocation Location @@ -359,7 +359,7 @@ BEGIN NameDeclarationWR1Envelope ::= SEQUENCE { partition SEQUENCE OF OCTET STRING, -- content: bodyKey - -- encryption algorithm: oaque-bn256 + -- encryption algorithm: oaque-BLS12381 -- encryption id: partition bodyKey OCTET STRING } @@ -382,9 +382,9 @@ BEGIN envelopeCiphertext OCTET STRING, -- content envelopeBodyKey - -- encryption algorithm: IBE-bn256 in subject system + -- encryption algorithm: IBE-BLS12381 in subject system -- id: envelopeID (namespace) - envelopeKey-ibe-bn256 OCTET STRING, + envelopeKey-ibe-BLS12381 OCTET STRING, -- content envelopeBodyKey -- encryption algorithm: AES128 @@ -393,17 +393,17 @@ BEGIN -- recipient, even without knowing the namespace envelopeKey-curve25519 OCTET STRING, - -- content prover/verifierBodyKeys - -- encryption algorithm: AES128 - -- key: ECDH (outer signature key, attester key) - -- this permits reading the attestation if you are the attester - -- even without knowing the namespace + -- content prover/verifierBodyKeys + -- encryption algorithm: AES128 + -- key: ECDH (outer signature key, attester key) + -- this permits reading the attestation if you are the attester + -- even without knowing the namespace envelopeKey-curve25519-attester OCTET STRING } WR1Envelope ::= SEQUENCE { -- content: proverBodyKey || proverBodyNonce || verifierBodyKey || verifierBodyNonce - -- encryption algorithm: oaque-bn256 in subject system + -- encryption algorithm: oaque-BLS12381 in subject system -- encryption attribute set: Partition bodyKeys-oaque OCTET STRING, @@ -460,20 +460,20 @@ BEGIN Private-Ed25519 ::= OCTET STRING Private-Curve25519 ::= OCTET STRING - Private-BN256-OAQUE ::= OCTET STRING - Private-BN256-IBE ::= OCTET STRING - Master-BN256-OAQUE ::= OCTET STRING - Master-BN256-IBE ::= OCTET STRING + Private-BLS12381-OAQUE ::= OCTET STRING + Private-BLS12381-IBE ::= OCTET STRING + Master-BLS12381-OAQUE ::= OCTET STRING + Master-BLS12381-IBE ::= OCTET STRING Public-Ed25519 ::= OCTET STRING Public-Curve25519 ::= OCTET STRING Public-OAQUE ::= SEQUENCE { - params Params-BN256-OAQUE, + params Params-BLS12381-OAQUE, attributeset SEQUENCE OF OCTET STRING } - Params-BN256-OAQUE ::= OCTET STRING - Params-BN256-IBE ::= OCTET STRING - Public-BN256-IBE ::= SEQUENCE { - params Params-BN256-IBE, + Params-BLS12381-OAQUE ::= OCTET STRING + Params-BLS12381-IBE ::= OCTET STRING + Public-BLS12381-IBE ::= SEQUENCE { + params Params-BLS12381-IBE, id OCTET STRING } -- Encapsulates parameters to PBKDF2. Sha3-512 is assumed as the hash function @@ -495,9 +495,9 @@ BEGIN envelope OCTET STRING, -- content envelopeKey - -- encryption algorithm: IBE-bn256 in message namespace system + -- encryption algorithm: IBE-BLS12381 in message namespace system -- id: envelopeID (namespace) - envelopeKey-ibe-bn256 OCTET STRING, + envelopeKey-ibe-BLS12381 OCTET STRING, -- the system for the keys namespace EntityHash, @@ -507,7 +507,7 @@ BEGIN MessageKeyWR1Envelope ::= SEQUENCE { partition SEQUENCE OF OCTET STRING, -- content: contentsKey - -- encryption algorithm: oaque-bn256 + -- encryption algorithm: oaque-BLS12381 -- encryption id: partition, contentsKey OCTET STRING } diff --git a/asn1c_files/pdu_collection.c b/asn1c_files/pdu_collection.c index fe87fb3..e19d7d5 100644 --- a/asn1c_files/pdu_collection.c +++ b/asn1c_files/pdu_collection.c @@ -10,7 +10,7 @@ extern struct asn_TYPE_descriptor_s asn_DEF_WaveEncryptedMessage; extern struct asn_TYPE_descriptor_s asn_DEF_AttestationBody; extern struct asn_TYPE_descriptor_s asn_DEF_WaveEntitySecret; extern struct asn_TYPE_descriptor_s asn_DEF_EntityKeyring; -extern struct asn_TYPE_descriptor_s asn_DEF_BN256OAQUEKeyringBundle; +extern struct asn_TYPE_descriptor_s asn_DEF_BLS12381OAQUEKeyringBundle; extern struct asn_TYPE_descriptor_s asn_DEF_WaveExplicitProof; extern struct asn_TYPE_descriptor_s asn_DEF_RTreePolicy; extern struct asn_TYPE_descriptor_s asn_DEF_HashSha3_256; @@ -36,13 +36,13 @@ extern struct asn_TYPE_descriptor_s asn_DEF_CommitmentRevocationOption; extern struct asn_TYPE_descriptor_s asn_DEF_AVKeyAES128_GCM; extern struct asn_TYPE_descriptor_s asn_DEF_Private_Ed25519; extern struct asn_TYPE_descriptor_s asn_DEF_Private_Curve25519; -extern struct asn_TYPE_descriptor_s asn_DEF_Private_BN256_IBE; -extern struct asn_TYPE_descriptor_s asn_DEF_Master_BN256_OAQUE; -extern struct asn_TYPE_descriptor_s asn_DEF_Master_BN256_IBE; +extern struct asn_TYPE_descriptor_s asn_DEF_Private_BLS12381_IBE; +extern struct asn_TYPE_descriptor_s asn_DEF_Master_BLS12381_OAQUE; +extern struct asn_TYPE_descriptor_s asn_DEF_Master_BLS12381_IBE; extern struct asn_TYPE_descriptor_s asn_DEF_Public_Ed25519; extern struct asn_TYPE_descriptor_s asn_DEF_Public_Curve25519; extern struct asn_TYPE_descriptor_s asn_DEF_Public_OAQUE; -extern struct asn_TYPE_descriptor_s asn_DEF_Public_BN256_IBE; +extern struct asn_TYPE_descriptor_s asn_DEF_Public_BLS12381_IBE; extern struct asn_TYPE_descriptor_s asn_DEF_KeyringAESCiphertext; extern struct asn_TYPE_descriptor_s asn_DEF_MessageKeyCurve25519ECDH; extern struct asn_TYPE_descriptor_s asn_DEF_MessageKeyWR1; @@ -57,7 +57,7 @@ struct asn_TYPE_descriptor_s *asn_pdu_collection[] = { &asn_DEF_AttestationBody, &asn_DEF_WaveEntitySecret, &asn_DEF_EntityKeyring, - &asn_DEF_BN256OAQUEKeyringBundle, + &asn_DEF_BLS12381OAQUEKeyringBundle, &asn_DEF_WaveExplicitProof, &asn_DEF_RTreePolicy, &asn_DEF_HashSha3_256, @@ -83,13 +83,13 @@ struct asn_TYPE_descriptor_s *asn_pdu_collection[] = { &asn_DEF_AVKeyAES128_GCM, &asn_DEF_Private_Ed25519, &asn_DEF_Private_Curve25519, - &asn_DEF_Private_BN256_IBE, - &asn_DEF_Master_BN256_OAQUE, - &asn_DEF_Master_BN256_IBE, + &asn_DEF_Private_BLS12381_IBE, + &asn_DEF_Master_BLS12381_OAQUE, + &asn_DEF_Master_BLS12381_IBE, &asn_DEF_Public_Ed25519, &asn_DEF_Public_Curve25519, &asn_DEF_Public_OAQUE, - &asn_DEF_Public_BN256_IBE, + &asn_DEF_Public_BLS12381_IBE, &asn_DEF_KeyringAESCiphertext, &asn_DEF_MessageKeyCurve25519ECDH, &asn_DEF_MessageKeyWR1, diff --git a/verify.cpp b/verify.cpp index 92d848e..1c71759 100644 --- a/verify.cpp +++ b/verify.cpp @@ -442,49 +442,15 @@ tuple *, long, } ocall_print("valid entity signature"); } else if (entKeyId == getTypeId(&asn_DEF_Public_Curve25519)) { - Public_Curve25519_t *ks = 0; - ks = (Public_Curve25519_t *) unmarshal(type.buf, type.size, ks, &asn_DEF_Public_Curve25519); - if (ks == nullptr) { - return verify_rtree_error("entity key is null"); - } - if (ks->size != 32) { - asn_DEF_Public_Curve25519.op->free_struct(&asn_DEF_Public_Curve25519, ks, ASFM_FREE_EVERYTHING); - return verify_rtree_error("key length is incorrect"); - } - asn_DEF_Public_Curve25519.op->free_struct(&asn_DEF_Public_Curve25519, ks, ASFM_FREE_EVERYTHING); - return verify_rtree_error("this key cannot perform certifications"); - } else if (entKeyId == getTypeId(&asn_DEF_Params_BN256_IBE)) { - Params_BN256_IBE_t *ks = 0; - ks = (Params_BN256_IBE_t *) unmarshal(type.buf, type.size, ks, &asn_DEF_Params_BN256_IBE); - if (ks == nullptr) { - return verify_rtree_error("entity key is null"); - } - asn_DEF_Params_BN256_IBE.op->free_struct(&asn_DEF_Params_BN256_IBE, ks, ASFM_FREE_EVERYTHING); - return verify_rtree_error("this key cannot perform certifications"); - } else if (entKeyId == getTypeId(&asn_DEF_Public_BN256_IBE)) { - Public_BN256_IBE_t *ks = 0; - ks = (Public_BN256_IBE_t *) unmarshal(type.buf, type.size, ks, &asn_DEF_Public_BN256_IBE); - if (ks == nullptr) { - return verify_rtree_error("entity key is null"); - } - asn_DEF_Public_BN256_IBE.op->free_struct(&asn_DEF_Public_BN256_IBE, ks, ASFM_FREE_EVERYTHING); return verify_rtree_error("this key cannot perform certifications"); - } else if (entKeyId == getTypeId(&asn_DEF_Params_BN256_IBE)) { - Params_BN256_OAQUE_t *ks = 0; - ks = (Params_BN256_OAQUE_t *) unmarshal(type.buf, type.size, ks, &asn_DEF_Params_BN256_OAQUE); - if (ks == nullptr) { - return verify_rtree_error("entity key is null"); - } - asn_DEF_Params_BN256_OAQUE.op->free_struct(&asn_DEF_Params_BN256_OAQUE, ks, ASFM_FREE_EVERYTHING); + } else if (entKeyId == getTypeId(&asn_DEF_Params_BLS12381_IBE)) { return verify_rtree_error("this key cannot perform certifications"); + } else if (entKeyId == getTypeId(&asn_DEF_Public_BLS12381_IBE)) { + return verify_rtree_error("this key cannot perform verification"); + } else if (entKeyId == getTypeId(&asn_DEF_Params_BLS12381_OAQUE)) { + return verify_rtree_error("this key cannot perform verification"); } else if (entKeyId == getTypeId(&asn_DEF_Public_OAQUE)) { - Public_OAQUE_t *ks = 0; - ks = (Public_OAQUE_t *) unmarshal(type.buf, type.size, ks, &asn_DEF_Public_OAQUE); - if (ks == nullptr) { - return verify_rtree_error("entity key is null"); - } - asn_DEF_Public_OAQUE.op->free_struct(&asn_DEF_Public_OAQUE, ks, ASFM_FREE_EVERYTHING); - return verify_rtree_error("this key cannot perform certifications"); + return verify_rtree_error("this key cannot perform verification"); } else { return verify_rtree_error("entity uses unsupported key scheme"); } @@ -498,6 +464,7 @@ tuple *, long, EXTERNAL_t lkey = tbsKey->key; ANY_t type = lkey.encoding.choice.single_ASN1_type; string lkeyId = marshal(lkey.direct_reference, &asn_DEF_OBJECT_IDENTIFIER); + // gofunc: EntityKeySchemeInstanceFor if (lkeyId == getTypeId(&asn_DEF_Public_Ed25519)) { Public_Ed25519_t *ks = 0; ks = (Public_Ed25519_t *) unmarshal(type.buf, type.size, ks, &asn_DEF_Public_Ed25519); @@ -520,27 +487,27 @@ tuple *, long, return verify_rtree_error("key length is incorrect"); } asn_DEF_Public_Curve25519.op->free_struct(&asn_DEF_Public_Curve25519, ks, ASFM_FREE_EVERYTHING); - } else if (lkeyId == getTypeId(&asn_DEF_Params_BN256_IBE)) { - Params_BN256_IBE_t *ks = 0; - ks = (Params_BN256_IBE_t *) unmarshal(type.buf, type.size, ks, &asn_DEF_Params_BN256_IBE); + } else if (lkeyId == getTypeId(&asn_DEF_Params_BLS12381_IBE)) { + Params_BLS12381_IBE_t *ks = 0; + ks = (Params_BLS12381_IBE_t *) unmarshal(type.buf, type.size, ks, &asn_DEF_Params_BLS12381_IBE); if (ks == nullptr) { return verify_rtree_error("tbs key is null"); } - asn_DEF_Params_BN256_IBE.op->free_struct(&asn_DEF_Params_BN256_IBE, ks, ASFM_FREE_EVERYTHING); - } else if (lkeyId == getTypeId(&asn_DEF_Public_BN256_IBE)) { - Public_BN256_IBE_t *ks = 0; - ks = (Public_BN256_IBE_t *) unmarshal(type.buf, type.size, ks, &asn_DEF_Public_BN256_IBE); + asn_DEF_Params_BLS12381_IBE.op->free_struct(&asn_DEF_Params_BLS12381_IBE, ks, ASFM_FREE_EVERYTHING); + } else if (lkeyId == getTypeId(&asn_DEF_Public_BLS12381_IBE)) { + Public_BLS12381_IBE *ks = 0; + ks = (Public_BLS12381_IBE *) unmarshal(type.buf, type.size, ks, &asn_DEF_Public_BLS12381_IBE); if (ks == nullptr) { return verify_rtree_error("tbs key is null"); } - asn_DEF_Public_BN256_IBE.op->free_struct(&asn_DEF_Public_BN256_IBE, ks, ASFM_FREE_EVERYTHING); - } else if (lkeyId == getTypeId(&asn_DEF_Params_BN256_OAQUE)) { - Params_BN256_OAQUE_t *ks = 0; - ks = (Params_BN256_OAQUE_t *) unmarshal(type.buf, type.size, ks, &asn_DEF_Params_BN256_OAQUE); + asn_DEF_Public_BLS12381_IBE.op->free_struct(&asn_DEF_Public_BLS12381_IBE, ks, ASFM_FREE_EVERYTHING); + } else if (lkeyId == getTypeId(&asn_DEF_Params_BLS12381_OAQUE)) { + Params_BLS12381_OAQUE_t *ks = 0; + ks = (Params_BLS12381_OAQUE_t *) unmarshal(type.buf, type.size, ks, &asn_DEF_Params_BLS12381_OAQUE); if (ks == nullptr) { return verify_rtree_error("tbs key is null"); } - asn_DEF_Params_BN256_OAQUE.op->free_struct(&asn_DEF_Params_BN256_OAQUE, ks, ASFM_FREE_EVERYTHING); + asn_DEF_Params_BLS12381_OAQUE.op->free_struct(&asn_DEF_Params_BLS12381_OAQUE, ks, ASFM_FREE_EVERYTHING); } else if (lkeyId == getTypeId(&asn_DEF_Public_OAQUE)) { Public_OAQUE_t *ks = 0; ks = (Public_OAQUE_t *) unmarshal(type.buf, type.size, ks, &asn_DEF_Public_OAQUE);