Skip to content

Commit

Permalink
change to new keys
Browse files Browse the repository at this point in the history
  • Loading branch information
ddreyer committed Jan 23, 2019
1 parent d06cfa3 commit f857d89
Show file tree
Hide file tree
Showing 47 changed files with 700 additions and 733 deletions.
14 changes: 7 additions & 7 deletions asn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
14 changes: 7 additions & 7 deletions asn.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
#include <WaveExplicitProof.h>
#include <Public-Ed25519.h>
#include <Public-Curve25519.h>
#include <Params-BN256-IBE.h>
#include <Params-BN256-OAQUE.h>
#include <Public-BN256-IBE.h>
#include <Params-BLS12381-IBE.h>
#include <Params-BLS12381-OAQUE.h>
#include <Public-BLS12381-IBE.h>
#include <Public-OAQUE.h>
#include <AVKeyAES128-GCM.h>
#include <HashKeccak-256.h>
Expand All @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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) */
Expand Down Expand Up @@ -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 */
Expand All @@ -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,
Expand All @@ -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 */
};

Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
* `asn1c -fcompound-names`
*/

#ifndef _BN256OAQUEBundleEntry_H_
#define _BN256OAQUEBundleEntry_H_
#ifndef _BLS12381OAQUEBundleEntry_H_
#define _BLS12381OAQUEBundleEntry_H_


#include <asn_application.h>

/* Including external dependencies */
#include "Private-BN256-OAQUE.h"
#include "Private-BLS12381-OAQUE.h"
#include <asn_SEQUENCE_OF.h>
#include <NativeInteger.h>
#include <OCTET_STRING.h>
Expand All @@ -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 <asn_internal.h>
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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 */
Expand All @@ -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,
Expand All @@ -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 */
};

Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
* `asn1c -fcompound-names`
*/

#ifndef _BN256OAQUEKeyringBundle_H_
#define _BN256OAQUEKeyringBundle_H_
#ifndef _BLS12381OAQUEKeyringBundle_H_
#define _BLS12381OAQUEKeyringBundle_H_


#include <asn_application.h>

/* Including external dependencies */
#include "Params-BN256-OAQUE.h"
#include "Params-BLS12381-OAQUE.h"
#include <asn_SEQUENCE_OF.h>
#include <constr_SEQUENCE_OF.h>
#include <constr_SEQUENCE.h>
Expand All @@ -22,31 +22,31 @@ 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;
} entries;

/* 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 <asn_internal.h>
Loading

0 comments on commit f857d89

Please sign in to comment.