Skip to content

Commit 5ecaf1d

Browse files
authored
Merge pull request #628 from Cypherock/feat/constellation/pubkey-address
feat: Constellation generate pubkey and address
2 parents 3e36ebc + 1a04b50 commit 5ecaf1d

File tree

4 files changed

+524
-5
lines changed

4 files changed

+524
-5
lines changed

apps/constellation_app/constellation_context.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@
2828
#define CONSTELLATION_ACCOUNT_INDEX 0x80000000 // 0'
2929
#define CONSTELLATION_CHANGE_INDEX 0x00000000 // 0
3030

31-
#define CONSTELLATION_PUB_KEY_SIZE 33
32-
#define CONSTELLATION_UNCOMPRESSED_PUB_KEY_SIZE 65
33-
#define CONSTELLATION_ACCOUNT_ADDRESS_LENGTH 40
31+
#define CONSTELLATION_PUB_KEY_SIZE 65
32+
#define CONSTELLATION_ACCOUNT_ADDRESS_SIZE 40
33+
#define PKCS_PREFIX_SIZE 23
34+
#define PKCS_PREFIXED_PUBKEY_SIZE PKCS_PREFIX_SIZE + CONSTELLATION_PUB_KEY_SIZE
35+
#define SHA256_DIGEST_SIZE 32
36+
#define BS58_ENCODED_SIZE 45
3437

3538
/*****************************************************************************
3639
* TYPEDEFS

apps/constellation_app/constellation_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ void constellation_main(usb_event_t usb_evt,
130130
switch ((uint8_t)query.which_request) {
131131
case CONSTELLATION_QUERY_GET_PUBLIC_KEYS_TAG:
132132
case CONSTELLATION_QUERY_GET_USER_VERIFIED_PUBLIC_KEY_TAG: {
133-
// constellation_get_pub_keys(&query);
133+
constellation_get_pub_keys(&query);
134134
break;
135135
}
136136
case CONSTELLATION_QUERY_SIGN_TXN_TAG: {

0 commit comments

Comments
 (0)