From 8573d2bc2af2b41273c5f6a5be9f62bf1b77b832 Mon Sep 17 00:00:00 2001 From: "atul.jha" Date: Wed, 20 Jan 2021 13:31:58 +0100 Subject: [PATCH] challenge response self --- {trial4 => ch-resp-self}/ECCtrial.c | 0 {trial4 => ch-resp-self}/KeyGen.c | 2 + {trial4 => ch-resp-self}/KeyGen.h | 8 + ch-resp-self/ROMprotocol.c | 273 ++++++++++++++++++ {trial4 => ch-resp-self}/ROMprotocol.h | 13 +- ch-resp-self/SecureStorage/Identity_priv.pem | 27 ++ .../SecureStorage/RANDFILE | Bin 1024 -> 704 bytes ch-resp-self/Stage2.c | 218 ++++++++++++++ ch-resp-self/Stage2.h | 45 +++ ch-resp-self/clientkeys/Client1_pub.pem | 4 + {trial4 => ch-resp-self}/defines.h | 82 +++++- {trial4 => ch-resp-self}/include/.gitignore | 0 .../include/CMakeLists.txt | 0 .../include/mbedtls/aes.h | 0 .../include/mbedtls/aesni.h | 0 .../include/mbedtls/arc4.h | 0 .../include/mbedtls/aria.h | 0 .../include/mbedtls/asn1.h | 0 .../include/mbedtls/asn1write.h | 0 .../include/mbedtls/base64.h | 0 .../include/mbedtls/bignum.h | 0 .../include/mbedtls/blowfish.h | 0 .../include/mbedtls/bn_mul.h | 0 .../include/mbedtls/camellia.h | 0 .../include/mbedtls/ccm.h | 0 .../include/mbedtls/certs.h | 0 .../include/mbedtls/chacha20.h | 0 .../include/mbedtls/chachapoly.h | 0 .../include/mbedtls/check_config.h | 0 .../include/mbedtls/cipher.h | 0 .../include/mbedtls/cipher_internal.h | 0 .../include/mbedtls/cmac.h | 0 .../include/mbedtls/compat-1.3.h | 0 .../include/mbedtls/config.h | 0 .../include/mbedtls/ctr_drbg.h | 0 .../include/mbedtls/debug.h | 0 .../include/mbedtls/des.h | 0 .../include/mbedtls/dhm.h | 0 .../include/mbedtls/ecdh.h | 0 .../include/mbedtls/ecdsa.h | 0 .../include/mbedtls/ecjpake.h | 0 .../include/mbedtls/ecp.h | 0 .../include/mbedtls/ecp_internal.h | 0 .../include/mbedtls/entropy.h | 0 .../include/mbedtls/entropy_poll.h | 0 .../include/mbedtls/error.h | 0 .../include/mbedtls/gcm.h | 0 .../include/mbedtls/havege.h | 0 .../include/mbedtls/hkdf.h | 0 .../include/mbedtls/hmac_drbg.h | 0 {trial4 => ch-resp-self}/include/mbedtls/md.h | 0 .../include/mbedtls/md2.h | 0 .../include/mbedtls/md4.h | 0 .../include/mbedtls/md5.h | 0 .../include/mbedtls/md_internal.h | 0 .../include/mbedtls/memory_buffer_alloc.h | 0 .../include/mbedtls/net.h | 0 .../include/mbedtls/net_sockets.h | 0 .../include/mbedtls/nist_kw.h | 0 .../include/mbedtls/oid.h | 0 .../include/mbedtls/padlock.h | 0 .../include/mbedtls/pem.h | 0 {trial4 => ch-resp-self}/include/mbedtls/pk.h | 0 .../include/mbedtls/pk_internal.h | 0 .../include/mbedtls/pkcs11.h | 0 .../include/mbedtls/pkcs12.h | 0 .../include/mbedtls/pkcs5.h | 0 .../include/mbedtls/platform.h | 0 .../include/mbedtls/platform_time.h | 0 .../include/mbedtls/platform_util.h | 0 .../include/mbedtls/poly1305.h | 0 .../include/mbedtls/psa_util.h | 0 .../include/mbedtls/ripemd160.h | 0 .../include/mbedtls/rsa.h | 0 .../include/mbedtls/rsa_internal.h | 0 .../include/mbedtls/sha1.h | 0 .../include/mbedtls/sha256.h | 0 .../include/mbedtls/sha512.h | 0 .../include/mbedtls/ssl.h | 0 .../include/mbedtls/ssl_cache.h | 0 .../include/mbedtls/ssl_ciphersuites.h | 0 .../include/mbedtls/ssl_cookie.h | 0 .../include/mbedtls/ssl_internal.h | 0 .../include/mbedtls/ssl_ticket.h | 0 .../include/mbedtls/threading.h | 0 .../include/mbedtls/timing.h | 0 .../include/mbedtls/version.h | 0 .../include/mbedtls/x509.h | 0 .../include/mbedtls/x509_crl.h | 0 .../include/mbedtls/x509_crt.h | 0 .../include/mbedtls/x509_csr.h | 0 .../include/mbedtls/xtea.h | 0 {trial4 => ch-resp-self}/include/psa/crypto.h | 0 .../include/psa/crypto_accel_driver.h | 0 .../include/psa/crypto_compat.h | 0 .../include/psa/crypto_driver_common.h | 0 .../include/psa/crypto_entropy_driver.h | 0 .../include/psa/crypto_extra.h | 0 .../include/psa/crypto_platform.h | 0 .../include/psa/crypto_se_driver.h | 0 .../include/psa/crypto_sizes.h | 0 .../include/psa/crypto_struct.h | 0 .../include/psa/crypto_types.h | 0 .../include/psa/crypto_values.h | 0 ch-resp-self/keys/Alias_priv.pem | 27 ++ ch-resp-self/keys/Alias_pub.pem | 9 + ch-resp-self/keys/Identity_pub.pem | 9 + ch-resp-self/keys/session1_priv.pem | 27 ++ ch-resp-self/keys/session1_pub.pem | 9 + {trial4 => ch-resp-self}/links.txt | 0 {trial4 => ch-resp-self}/main | Bin ch-resp-self/main.c | 202 +++++++++++++ {trial4 => ch-resp-self}/makefile | 10 +- ch-resp-self/out/main | Bin 0 -> 23368 bytes ch-resp-self/sslkeys/Alias_priv.pem | 5 + ch-resp-self/sslkeys/Alias_pub.pem | 4 + ch-resp-self/sslkeys/test_privkey.pem | 5 + ch-resp-self/sslkeys/test_public.pem | 4 + trial4/ROMProtocol.c | 102 ------- trial4/ROMprotocol.c | 48 ++- trial4/main.c | 94 ------ trial4/nbproject/configurations.xml | 51 ---- .../CodeAssistancePathMapper.properties | 1 - trial4/nbproject/private/Default-build.log | 1 - trial4/nbproject/private/Default-exec.log | 73 ----- trial4/nbproject/private/Default.properties | 3 - .../private/c_standard_headers_indexer.c | 75 ----- trial4/nbproject/private/configurations.xml | 148 ---------- .../private/cpp_standard_headers_indexer.cpp | 135 --------- trial4/nbproject/private/launcher.properties | 42 --- trial4/nbproject/private/private.xml | 20 -- trial4/nbproject/project.xml | 26 -- trial4/out/main | Bin 22920 -> 0 bytes 133 files changed, 1018 insertions(+), 784 deletions(-) rename {trial4 => ch-resp-self}/ECCtrial.c (100%) rename {trial4 => ch-resp-self}/KeyGen.c (99%) rename {trial4 => ch-resp-self}/KeyGen.h (90%) create mode 100644 ch-resp-self/ROMprotocol.c rename {trial4 => ch-resp-self}/ROMprotocol.h (75%) create mode 100644 ch-resp-self/SecureStorage/Identity_priv.pem rename {trial4 => ch-resp-self}/SecureStorage/RANDFILE (66%) create mode 100644 ch-resp-self/Stage2.c create mode 100644 ch-resp-self/Stage2.h create mode 100644 ch-resp-self/clientkeys/Client1_pub.pem rename {trial4 => ch-resp-self}/defines.h (58%) rename {trial4 => ch-resp-self}/include/.gitignore (100%) rename {trial4 => ch-resp-self}/include/CMakeLists.txt (100%) rename {trial4 => ch-resp-self}/include/mbedtls/aes.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/aesni.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/arc4.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/aria.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/asn1.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/asn1write.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/base64.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/bignum.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/blowfish.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/bn_mul.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/camellia.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/ccm.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/certs.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/chacha20.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/chachapoly.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/check_config.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/cipher.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/cipher_internal.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/cmac.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/compat-1.3.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/config.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/ctr_drbg.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/debug.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/des.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/dhm.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/ecdh.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/ecdsa.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/ecjpake.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/ecp.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/ecp_internal.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/entropy.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/entropy_poll.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/error.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/gcm.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/havege.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/hkdf.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/hmac_drbg.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/md.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/md2.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/md4.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/md5.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/md_internal.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/memory_buffer_alloc.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/net.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/net_sockets.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/nist_kw.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/oid.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/padlock.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/pem.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/pk.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/pk_internal.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/pkcs11.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/pkcs12.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/pkcs5.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/platform.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/platform_time.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/platform_util.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/poly1305.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/psa_util.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/ripemd160.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/rsa.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/rsa_internal.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/sha1.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/sha256.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/sha512.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/ssl.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/ssl_cache.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/ssl_ciphersuites.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/ssl_cookie.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/ssl_internal.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/ssl_ticket.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/threading.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/timing.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/version.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/x509.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/x509_crl.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/x509_crt.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/x509_csr.h (100%) rename {trial4 => ch-resp-self}/include/mbedtls/xtea.h (100%) rename {trial4 => ch-resp-self}/include/psa/crypto.h (100%) rename {trial4 => ch-resp-self}/include/psa/crypto_accel_driver.h (100%) rename {trial4 => ch-resp-self}/include/psa/crypto_compat.h (100%) rename {trial4 => ch-resp-self}/include/psa/crypto_driver_common.h (100%) rename {trial4 => ch-resp-self}/include/psa/crypto_entropy_driver.h (100%) rename {trial4 => ch-resp-self}/include/psa/crypto_extra.h (100%) rename {trial4 => ch-resp-self}/include/psa/crypto_platform.h (100%) rename {trial4 => ch-resp-self}/include/psa/crypto_se_driver.h (100%) rename {trial4 => ch-resp-self}/include/psa/crypto_sizes.h (100%) rename {trial4 => ch-resp-self}/include/psa/crypto_struct.h (100%) rename {trial4 => ch-resp-self}/include/psa/crypto_types.h (100%) rename {trial4 => ch-resp-self}/include/psa/crypto_values.h (100%) create mode 100644 ch-resp-self/keys/Alias_priv.pem create mode 100644 ch-resp-self/keys/Alias_pub.pem create mode 100644 ch-resp-self/keys/Identity_pub.pem create mode 100644 ch-resp-self/keys/session1_priv.pem create mode 100644 ch-resp-self/keys/session1_pub.pem rename {trial4 => ch-resp-self}/links.txt (100%) rename {trial4 => ch-resp-self}/main (100%) create mode 100644 ch-resp-self/main.c rename {trial4 => ch-resp-self}/makefile (54%) create mode 100755 ch-resp-self/out/main create mode 100644 ch-resp-self/sslkeys/Alias_priv.pem create mode 100644 ch-resp-self/sslkeys/Alias_pub.pem create mode 100644 ch-resp-self/sslkeys/test_privkey.pem create mode 100644 ch-resp-self/sslkeys/test_public.pem delete mode 100644 trial4/ROMProtocol.c delete mode 100644 trial4/main.c delete mode 100644 trial4/nbproject/configurations.xml delete mode 100644 trial4/nbproject/private/CodeAssistancePathMapper.properties delete mode 100644 trial4/nbproject/private/Default-build.log delete mode 100644 trial4/nbproject/private/Default-exec.log delete mode 100644 trial4/nbproject/private/Default.properties delete mode 100644 trial4/nbproject/private/c_standard_headers_indexer.c delete mode 100644 trial4/nbproject/private/configurations.xml delete mode 100644 trial4/nbproject/private/cpp_standard_headers_indexer.cpp delete mode 100644 trial4/nbproject/private/launcher.properties delete mode 100644 trial4/nbproject/private/private.xml delete mode 100644 trial4/nbproject/project.xml delete mode 100755 trial4/out/main diff --git a/trial4/ECCtrial.c b/ch-resp-self/ECCtrial.c similarity index 100% rename from trial4/ECCtrial.c rename to ch-resp-self/ECCtrial.c diff --git a/trial4/KeyGen.c b/ch-resp-self/KeyGen.c similarity index 99% rename from trial4/KeyGen.c rename to ch-resp-self/KeyGen.c index 75894b8..d9b7c37 100644 --- a/trial4/KeyGen.c +++ b/ch-resp-self/KeyGen.c @@ -49,6 +49,8 @@ void cleanup() DIMASTATUS use_dev_random(void *data, unsigned char *output, size_t len, size_t *olen ) { + //initiate HW TRNG + FILE *file; size_t ret, left = len; unsigned char *p = output; diff --git a/trial4/KeyGen.h b/ch-resp-self/KeyGen.h similarity index 90% rename from trial4/KeyGen.h rename to ch-resp-self/KeyGen.h index c031a55..d381277 100644 --- a/trial4/KeyGen.h +++ b/ch-resp-self/KeyGen.h @@ -1,3 +1,8 @@ +#ifndef KEYGEN_HEADERS_SEEN +//check header file for re-def conflicts + +#define KEYGEN_HEADERS_SEEN + #include #include @@ -47,3 +52,6 @@ DIMASTATUS AsymmKeyGen(KeyDrv_context * KD_ctx); DIMASTATUS WritePrivKey(KeyDrv_context * KD_ctx, mbedtls_pk_context * key_ctx); DIMASTATUS WritePubKey(KeyDrv_context * KD_ctx, mbedtls_pk_context * key_ctx); + + +#endif //KEYGEN_HEADERS_SEEN \ No newline at end of file diff --git a/ch-resp-self/ROMprotocol.c b/ch-resp-self/ROMprotocol.c new file mode 100644 index 0000000..0ce64b0 --- /dev/null +++ b/ch-resp-self/ROMprotocol.c @@ -0,0 +1,273 @@ +#include "ROMprotocol.h" + + +/* + DIMASTATUS ret = 0; + int len = 0; + + +if(DEBUG) +{printf("PASS \n");} + +if(ret < DIMASUCCESS) + { + perror("\n"); + + //other cleanup + exit(); + } + +*/ + +DIMASTATUS ROMprotocol() +{ + + printf("PASS 10\n"); + + DIMASTATUS ret = 0; + int len = 0; + + if(DEBUG) + {printf("PASS 11\n");} + + + //Calculate DIMA RTM hash + + //////////////TODO//////////////// + //this should be calculated on the DIMA bin and remain static. + //how to do that? + //hardcoding junk value for now + + uint8_t RTM_ID[SHA256_DGST_SIZE] = { 0xbe,0x67,0x0a,0xf8,0xf3,0x92,0x0e,0x4f, + 0xba,0x68,0xd1,0x56,0xea,0x34,0x3f,0xbc, + 0xf1,0xd9,0x30,0xe2,0x33,0xcc,0x28,0xc5, + 0x7b,0xbb,0x38,0x7d,0xe6,0x66,0xbb,0x1e }; + + //Calculating UDS hash + + FILE *fp = NULL; + fp = fopen("SecureStorage/RANDFILE", "rb"); + if(!fp) + { + perror("DIMAFILENOTFOUND: Unable to access UDS\n"); + + fclose(fp); + exit(DIMAFILENOTFOUND); + } + + if(DEBUG) +{printf("PASS 12\n");} + + uint8_t *UDSbuf = calloc(1, sizeof(uint8_t)*SHA256_DGST_SIZE); + fread(UDSbuf,UDS_SIZE,1,fp); + fclose(fp); + +if(DEBUG) +{printf("PASS 13\n");} + + + uint8_t* UDS_ID = calloc(1,sizeof(uint8_t)*SHA256_DGST_SIZE); + ret = mbedtls_sha256_ret( UDSbuf,UDS_SIZE,UDS_ID,0 ); + if(ret < DIMASUCCESS) + { + perror("DIMASHAFAILUE:\n"); + + free(UDSbuf); + free(UDS_ID); + exit(DIMAFAILUREUNKWN); + } + + free(UDSbuf); + //UDS_ID contains the UDS hash + //Printer +if(DEBUG) +{ + for (int i = 0; i < UDS_SIZE; i++) + printf("%hhx", UDSbuf[i]); + printf(" : fuse secret\n" ); + + for (int i = 0; i < SHA256_DGST_SIZE; i++) + printf("%hhx", UDS_ID[i]); + printf(" : UDS ID\n" ); +} + + //Calculating CDI SHA256 + + uint8_t* CDI = calloc(1,sizeof(uint8_t)*SHA256_DGST_SIZE); + mbedtls_sha256_context CDI_ctx; + mbedtls_sha256_init(&CDI_ctx); + + ret = mbedtls_sha256_starts_ret(&CDI_ctx,0); + if(ret < DIMASUCCESS) + { + perror("DIMASHAFAILURE\n"); + mbedtls_sha256_free(&CDI_ctx); + exit(DIMASHAFAILURE); + } + + ret = mbedtls_sha256_update_ret(&CDI_ctx, UDS_ID, SHA256_DGST_SIZE); + if(ret < DIMASUCCESS) + { + perror("DIMASHAFAILURE\n"); + mbedtls_sha256_free(&CDI_ctx); + exit(DIMASHAFAILURE); + } + + ret = mbedtls_sha256_update_ret(&CDI_ctx, RTM_ID, SHA256_DGST_SIZE); + if(ret < DIMASUCCESS) + { + perror("DIMASHAFAILURE\n"); + mbedtls_sha256_free(&CDI_ctx); + exit(DIMASHAFAILURE); + } + + ret = mbedtls_sha256_finish_ret(&CDI_ctx,CDI); + if(ret < DIMASUCCESS) + { + perror("DIMASHAFAILURE\n"); + mbedtls_sha256_free(&CDI_ctx); + exit(DIMASHAFAILURE); + } + + free(UDS_ID); + //free(RTM_ID); + mbedtls_sha256_free(&CDI_ctx); + +if(DEBUG) +{ + for(int i = 0; i < SHA256_DGST_SIZE; i++) + printf("%hhx",CDI[i]); + printf(" : CDI\n"); +} + +if(DEBUG) +{printf("PASS 14\n");} + //Calculating CDI key, HKDF + + const mbedtls_md_info_t * md_info; + if(!(md_info = mbedtls_md_info_from_type(HKDF_ALG))) + { + perror("DIMAHKDFFAILURE: MD alg type def failed\n"); + exit(DIMAHKDFFAILURE); + } + + uint8_t salt[32] = { 0x30,0xe2,0x3e,0xcc,0x28,0xc5,0x7b,0xbb, + 0x38,0x7d,0xe6,0x66,0xbb,0xf1,0xd9,0x1e, + 0xbe,0x67,0x0a,0xf8,0xf3,0x92,0x0e,0xba, + 0x68,0xd1,0x56,0xea,0x34,0x3f,0xbc,0x4f }; + + uint8_t * CDIKEY = calloc(1, sizeof(uint8_t)*HKDF_KEY_SIZE); + ret = mbedtls_hkdf(md_info, salt, sizeof(salt), CDI, SHA256_DGST_SIZE, + IDENTITY, sizeof(IDENTITY), CDIKEY, HKDF_KEY_SIZE); + + if(ret < DIMASUCCESS) + { + perror("DIMAHKDFFAILURE\n"); + free(CDI); + free(CDIKEY); + exit(DIMAHKDFFAILURE); + } + + //free(CDI); + +if(DEBUG) +{ + for(int i = 0; i < HKDF_KEY_SIZE; i++) + printf("%hhx",CDIKEY[i]); + printf(" : CDIKEY\n"); +} + +if(DEBUG) +{printf("PASS 15\n");} + + + + //Every key derivation should start with a new KD contxt + //setting context for DID + + KeyDrv_context DID_ctx; + DID_ctx.ENT_MODE = DETERM; + DID_ctx.PKC_MODE = DFL_PKC; + DID_ctx.seed = CDIKEY; + DID_ctx.phrase = IDENTITY; + DID_ctx.KEY_FORM = DFL_FORM; + //DID_ctx.pub_file = DFL_PUB; + //DID_ctx.priv_file = DFL_PRIV; //Dont save DID priv outside SS + +if(DEBUG) +{printf("PASS 16\n");} + + //Deriving and storing DID + ret = AsymmKeyGen(&DID_ctx); + if(ret < DIMASUCCESS) + { + perror("DIMAFAILURE : DID key gen failed\n"); + free(CDIKEY); + exit(DIMAFAILURE); + } + + free(CDIKEY); //But CDIKey is needed to gen AliasKP + //delete DID_ctx?? + + //setting context for Alias keys + +//////////////////////////deriving alisa keys + + + //placeholder FW_ID + uint8_t FW_ID[SHA256_DGST_SIZE] = { 0xf3,0x92,0x0e,0x4f,0xbe,0x67,0x0a,0xf8, + 0xf1,0xd9,0x30,0xe2,0x33,0xcc,0x28,0xc5, + 0xba,0x68,0xd1,0x56,0xea,0x34,0x3f,0xbc, + 0xe6,0x66,0xbb,0x1e,0x7b,0xbb,0x38,0x7d }; + + uint8_t * FWKEY = calloc(1, sizeof(uint8_t)*HKDF_KEY_SIZE); + + //create Alias key derivation material using CDI and seed and FW_ID as salt + //Alternatively do composite hash of CDI and FW_ID to create Alias key der material + ret = mbedtls_hkdf(md_info, FW_ID, sizeof(FW_ID), CDI, SHA256_DGST_SIZE, + ALIAS, sizeof(ALIAS), FWKEY, HKDF_KEY_SIZE); + + if(ret < DIMASUCCESS) + { + perror("DIMAHKDFFAILURE\n"); + exit(DIMAHKDFFAILURE); + } + + KeyDrv_context ALIAS_ctx; + ALIAS_ctx.ENT_MODE = DETERM; + ALIAS_ctx.PKC_MODE = DFL_PKC; + ALIAS_ctx.seed = FWKEY; + ALIAS_ctx.phrase = ALIAS; + ALIAS_ctx.KEY_FORM = DFL_FORM; + + printf("Generating Alias keys\n"); + + ret = AsymmKeyGen(&ALIAS_ctx); + if(ret < DIMASUCCESS) + { + perror("DIMAFAILURE : ALIAS key gen failed\n"); + exit(DIMAFAILURE); + } + + + //session keys? + + free(CDI); + free(FWKEY); + + +if(DEBUG) +{printf("PASS 17\n");} + + + + +if(DEBUG) +{printf("PASS 100\n");} + return DIMASUCCESS; + +} + + + +///////////////////////// diff --git a/trial4/ROMprotocol.h b/ch-resp-self/ROMprotocol.h similarity index 75% rename from trial4/ROMprotocol.h rename to ch-resp-self/ROMprotocol.h index 8556253..57d4fef 100644 --- a/trial4/ROMprotocol.h +++ b/ch-resp-self/ROMprotocol.h @@ -1,3 +1,9 @@ +#ifndef ROMprot_HEADERS_SEEN +//check header file for re-def conflicts + +#define ROMprot_HEADERS_SEEN + + #include "KeyGen.h" #include @@ -21,4 +27,9 @@ -DIMASTATUS ROMprotocol(void); \ No newline at end of file +DIMASTATUS ROMprotocol(void); + + + + +#endif \ No newline at end of file diff --git a/ch-resp-self/SecureStorage/Identity_priv.pem b/ch-resp-self/SecureStorage/Identity_priv.pem new file mode 100644 index 0000000..3484778 --- /dev/null +++ b/ch-resp-self/SecureStorage/Identity_priv.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpAIBAAKCAQEA1FomNTVE/DdCHc0JAOZW6BC6zwcZOklne1FFni0EXJYNL4mY +XyDvigv6zOQObjYtgKIwj01WSxAA1/4EcjfcVt6sR+I0ufEjoSDF/WX+5jFc/k5l +dnWwZzBBEfZVSuZu8LAhqpj7woY95x9QzvNGKq0neEIonihRSnQTfwingDsKd6+c +i0H85Pi7lJ9bGpVTGlE9AMQBQvHRlnl3Ig+L7UDeNN4CDAXYvIqXTq0RQ+OvdvMY +g1Af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ZQ43KFC6bS0sizx4pCcVjhJWFS +ysRcK+qaZ6X8xeHYmJYHDvgBMnoE9xqxY2T9Ln5mYXxflOy8zP6SNCZYLdRRBB9/ +caHyoQKBgQDhJqhzsNBiNp8ViVh9hGNfC991M2BeXojSuTwOY07uaepMgk5qcvaR +H0HQULeflblkRuf2BxslmRMmNp/1P8uCFVnd1t+XIjz7r6RFxTsgnSTd/ee6V7Nl +vgMTOj11Kz7cWjH+4LCfc/CtIZKvkQnM/1uAQMzjr2K6+fNQAZFBKw== +-----END RSA PRIVATE KEY----- diff --git a/trial4/SecureStorage/RANDFILE b/ch-resp-self/SecureStorage/RANDFILE similarity index 66% rename from trial4/SecureStorage/RANDFILE rename to ch-resp-self/SecureStorage/RANDFILE index fd3981be19fb821cee53a8f8969c2cc21a46a686..3a0d8a4bcd3e705b2e084003e0cd2bf702e80c1d 100644 GIT binary patch delta 9 QcmZqRIKaBuf$;zn01zt!1ONa4 delta 330 zcmV-Q0k!_X1%L>D^1r`-eo6 zmX@J1mP^Z~;#b3l=D6No*vDVY_idzu?SmA`WG|@BqsdMHx_M+&3~nwP#GL@kBYkJ2 z)stf^%!&UjZ>AW2MG=IT^5y`%3)^kl4VhyFuOrh8A7rPw6f^G^5Z4+ODRy>|z5k5KQvD9r3!T?pig7`!%;XNZ4dW*z c$rT)iNHjw(^>v(m&u+M-=v5Kf+{&=P0x(CQ6#xJL diff --git a/ch-resp-self/Stage2.c b/ch-resp-self/Stage2.c new file mode 100644 index 0000000..c710b45 --- /dev/null +++ b/ch-resp-self/Stage2.c @@ -0,0 +1,218 @@ +#include "Stage2.h" + +/* + Client_info + const char * cli_ID; + const char * pub_file; + mbedtls_ecp_point * pub_key; + int Cli_STATUS; + int Cli_CAP; +*/ + + +DIMASTATUS load_nodes(Client_info * Cl_list) +{ + + printf("PASS 20\n"); + DIMASTATUS ret = 0; + int len = 0; + + mbedtls_entropy_context entropy; + mbedtls_entropy_init(&entropy); + + uint8_t * RAND = calloc(1, sizeof(uint8_t)*NONCE_SIZE); + + if(DEBUG) + {printf("PASS 21\n");} + + //load from access list? + //////////////////////////TODO//////////////////////////// + //Protected accesslist must be unlocked with Alias key + //Allow access to client list only after successful DICE + + + //itrate over client list : perclient + Client_info Cl1_ctx; + Cl1_ctx.cli_ID = "Node1"; + Cl1_ctx.pub_file = "clientkeys/Client1_pub.pem"; + Cl1_ctx.Cli_STATUS = Cl_unverf; + Cl1_ctx.Cli_CAP = DFL_CAP; + + //mbedtls_entropy_gather(&entropy); + ret = mbedtls_entropy_func(&entropy, RAND, sizeof(RAND)); + if(ret < DIMASUCCESS) + { + perror("DIMADRBGFAILURE : Failed to gen NONCE\n"); + exit(DIMADRBGFAILURE); + } + + Cl1_ctx.NONCE = RAND; + + /* + if(DEBUG) + { + for(int i = 0; i < NONCE_SIZE; i++) + printf("%hhx",Cl1_ctx.NONCE[i]); + printf(" : NONCE inter\n"); + } + */ + + //add to the client list + Cl_list[1] = Cl1_ctx; + + //end perclient itetration + + mbedtls_entropy_free(&entropy); + return DIMASUCCESS; +} + +/* NOT USING THIS + +DIMASTATUS genNONCE(Client_info * Cl_ctx) +{ + +// +//1. create new genNONCe session n entropy per client +//2. pass client list iterate over active clients genNONCE for all +// + + mbedtls_entropy_context entropy; + mbedtls_entropy_init(&entropy); + + DIMASTATUS ret = 0; + + uint8_t * RAND = calloc(1, sizeof(uint8_t)*NONCE_SIZE); +if(DEBUG)printf("Pass1\n"); + + //mbedtls_entropy_gather(&entropy); + ret = mbedtls_entropy_func(&entropy, RAND, sizeof(RAND)); + if(ret < DIMASUCCESS) + { + perror("DIMADRBGFAILURE : Failed to gen NONCE\n"); + exit(DIMADRBGFAILURE); + } + +if(DEBUG)printf("Pass2\n"); + Cl_ctx -> NONCE = RAND; + + if(DEBUG) + { + for(int i = 0; i < NONCE_SIZE; i++) + printf("%hhx",RAND[i]); + printf(" : RAND\n"); + } + if(DEBUG) + { + for(int i = 0; i < NONCE_SIZE; i++) + printf("%hhx",Cl_ctx -> NONCE[i]); + printf(" : NONCE\n"); + } + + mbedtls_entropy_free(&entropy); + + return DIMASUCCESS; +} + + +*/ + +DIMASTATUS challenge( mbedtls_pk_context * pk_ctx, Client_info * Cl_ctx, uint8_t *sign, size_t *signlen) +{ + + DIMASTATUS ret = 0; + uint8_t* dgst = calloc(1,sizeof(uint8_t)*SHA256_DGST_SIZE); + + ret = mbedtls_sha256_ret( Cl_ctx->NONCE,NONCE_SIZE,dgst,0 ); + if(ret < DIMASUCCESS) + { + perror("DIMASHAFAILURE : could not perfom SHA digest\n"); + return DIMASHAFAILURE; + } + +// ret = mbedtls_md(mbedtls_md_info_from_type( MBEDTLS_MD_SHA256 ), +// Cl_list[1].NONCE, NONCE_SIZE, hash ); + + if(DEBUG) + { + for (int i = 0; i < SHA256_DGST_SIZE; i++) + printf("%hhx", dgst[i]); + printf(" : sha dgst\n" ); + + } + + //ret = mbedtls_pk_sign( &pk_ctx, MBEDTLS_MD_SHA256, dgst, SHA256_DGST_SIZE, sign, &signlen, + // mbedtls_ctr_drbg_random, &drbgCtx ); + ret = mbedtls_pk_sign( pk_ctx, MBEDTLS_MD_SHA256, dgst, SHA256_DGST_SIZE, sign, signlen, + NULL,NULL ); + + if(ret < DIMASUCCESS) + { + perror("DIMASIGNFAILURE : could not perfom private key signature\n"); + return DIMASIGNFAILURE; + } + + if(DEBUG) + { + for (int i = 0; i < *signlen; i++) + printf("%hhx", sign[i]); + printf(" :signature intr\n" ); + + } + return DIMASUCCESS; + +} + + +DIMASTATUS response( mbedtls_pk_context * pk_ctx, Client_info * Cl_ctx, uint8_t *sign, size_t signlen) +{ + + //Paramer checks + if(Cl_ctx->Cli_STATUS != Cl_unverf) + { + printf("DIMAINFOMISMATCH :Client %s verification already performed. skipping to next client..", Cl_ctx->cli_ID); + return DIMAINFOMISMATCH; + } + + ////// + + DIMASTATUS ret = 0; + uint8_t* dgst = calloc(1,sizeof(uint8_t)*SHA256_DGST_SIZE); + + ret = mbedtls_sha256_ret( Cl_ctx->NONCE,NONCE_SIZE,dgst,0 ); + if(ret < DIMASUCCESS) + { + perror("DIMASHAFAILURE : could not perfom SHA digest\n"); + return DIMASHAFAILURE; + } + + /* + if(DEBUG) + { + for(int i = 0; i < NONCE_SIZE; i++) + printf("%hhx",Cl_ctx.NONCE[i]); + printf(" : NONCE verf\n"); + } + + if(DEBUG) + { + for (int i = 0; i < signlen; i++) + printf("%hhx", sign[i]); + printf(" :signature verf\n" ); + + } + */ + + ret = mbedtls_pk_verify( pk_ctx, MBEDTLS_MD_SHA256, dgst, 0, sign, signlen ); + if (ret < DIMASUCCESS) + { + perror("DIMAVERIFYFAILURE : could not verify signature\n"); + Cl_ctx->Cli_STATUS = Cl_fault; + return DIMAVERIFYFAILURE; + } + + Cl_ctx->Cli_STATUS = Cl_verfd; + + + return DIMASUCCESS; + +} \ No newline at end of file diff --git a/ch-resp-self/Stage2.h b/ch-resp-self/Stage2.h new file mode 100644 index 0000000..1198f31 --- /dev/null +++ b/ch-resp-self/Stage2.h @@ -0,0 +1,45 @@ +#ifndef STAGE2_HEADERS_SEEN +//check header file for re-def conflicts + +#define STAGE2_HEADERS_SEEN + +#include +#include +#include +#include + +#include "mbedtls/config.h" + +#include "mbedtls/aes.h" +#include "mbedtls/bignum.h" +#include "mbedtls/ctr_drbg.h" +#include "mbedtls/entropy.h" +#include "mbedtls/ecp.h" +#include "mbedtls/ecdh.h" +#include "mbedtls/ecdsa.h" +#include "mbedtls/hmac_drbg.h" +#include "mbedtls/hkdf.h" +#include "mbedtls/md.h" +#include "mbedtls/pk.h" +#include "mbedtls/rsa.h" +#include "mbedtls/sha1.h" +#include "mbedtls/sha256.h" + + +#include "defines.h" + + +DIMASTATUS load_nodes(Client_info * Cl_list); + +DIMASTATUS genNONCE( Client_info * Cl_ctx); + +DIMASTATUS challenge( mbedtls_pk_context * pk_ctx, Client_info * Cl_ctx, uint8_t *sign, size_t *signlen); +//DIMASTATUS challengeCTX( mbedtls_pk_context * pk_ctx, Client_info * Cl_ctx, Chall_context * ch_ctx); + + +DIMASTATUS response( mbedtls_pk_context * pk_ctx, Client_info * Cl_ctx, uint8_t *sign, size_t signlen); +//DIMASTATUS responseCTX( mbedtls_pk_context * pk_ctx, Client_info * Cl_ctx, Resp_context * resp_ctx); + + + +#endif \ No newline at end of file diff --git a/ch-resp-self/clientkeys/Client1_pub.pem b/ch-resp-self/clientkeys/Client1_pub.pem new file mode 100644 index 0000000..4a6b64a --- /dev/null +++ b/ch-resp-self/clientkeys/Client1_pub.pem @@ -0,0 +1,4 @@ +-----BEGIN PUBLIC KEY----- +MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE3oUdlMtMjJjf6Co58GJZEV2bvqrQ +KUOu4cC822amlPgucZnX7gI4VbqqJ/Tjk5IieiNBFbh0/2vsyRo3Lis58A== +-----END PUBLIC KEY----- diff --git a/trial4/defines.h b/ch-resp-self/defines.h similarity index 58% rename from trial4/defines.h rename to ch-resp-self/defines.h index 5d8e631..9a527e7 100644 --- a/trial4/defines.h +++ b/ch-resp-self/defines.h @@ -1,4 +1,9 @@ +#ifndef DEFINE_HEADERS_SEEN +//check header file for re-def conflicts + +#define DEFINE_HEADERS_SEEN + /* ERROR CODES TO BE USED IN DIMA */ #define DIMASTATUS int @@ -16,6 +21,11 @@ #define DIMADRBGFAILURE -1008 #define DIMAHKDFFAILURE -1009 #define DIMAPKFAILURE -1010 +#define DIMASIGNFAILURE -1011 +#define DIMAVERIFYFAILURE -1012 + + +#define DIMAINFOMISMATCH -1100 #define DIMAFAILUREUNKWN -1111 @@ -33,6 +43,10 @@ #define RSA_SIZE 2048 //4096 #define RSA_EXP 65537 #define KEY_BUF_SIZE 16000 +#define NONCE_SIZE 2 + + + /* SPECIFIC AND SPECIAL VALUES */ /* DO NOT CHANGE THIS BLOCK */ @@ -51,7 +65,7 @@ #define isRSA 0 #define isECC 1 -#define DFL_PKC isECC // isECC, 1 = ECC, 0= RSA +#define DFL_PKC isRSA // isECC, 1 = ECC, 0= RSA //#define BIN 2 #define PEM 0 @@ -72,6 +86,24 @@ ////////////////////////////////////////////////// +///Stage 2 configs + +#define CL_NOS 2 //No of clients to be verified by THIS node + + +//Clinet verification status +#define Cl_unverf 0 +#define Cl_verfd 1 +#define Cl_fault -1 +#define DFL_CL_STAT Cl_unverf + +//Client capabilities master, node, leaf +//evita full, med, small +#define CAP_FULL 1 + +#define DFL_CAP CAP_FULL + +/////////////////////////////////////////////////// /* typedefs */ @@ -88,6 +120,9 @@ typedef struct int KEY_FORM; //BIN,PEM,DER char * pub_file; char * priv_file; + //placeholder, not implemented + mbedtls_ecp_point * pub_key; //used to store keys in mem, if needed + mbedtls_mpi * priv_key; } KeyDrv_context; @@ -99,6 +134,49 @@ typedef struct const char * filename; //in file size_t inLen; uint8_t * outbuf; //out buf -} Hash_contxt; +} Hash_context; //useless structure ^ this one + + +typedef struct +{ + /* + Use this struct to load, store and update client info on server side + or both ways if mutual attestation is possible + */ + const char * cli_ID; + const char * pub_file; + mbedtls_ecp_point * pub_key; + int Cli_STATUS; + int Cli_CAP; + const uint8_t * NONCE; + +} Client_info; + +typedef struct +{ + //Use this struct to maintain uniformity between client and sever + + const char * cli_ID; + const uint8_t * NONCE; + const uint8_t * sign; + const size_t sig_len; + +} Chall_context; + + +typedef struct +{ + //Use this struct to maintain uniformity between client and sever + + const char * cli_ID; + const uint8_t * NONCE; + const uint8_t * sign; + const size_t sig_len; +} Resp_context; + + + +#endif //DEFINE_HEADERS_SEEN +//End of file \ No newline at end of file diff --git a/trial4/include/.gitignore b/ch-resp-self/include/.gitignore similarity index 100% rename from trial4/include/.gitignore rename to ch-resp-self/include/.gitignore diff --git a/trial4/include/CMakeLists.txt b/ch-resp-self/include/CMakeLists.txt similarity index 100% rename from trial4/include/CMakeLists.txt rename to ch-resp-self/include/CMakeLists.txt diff --git a/trial4/include/mbedtls/aes.h b/ch-resp-self/include/mbedtls/aes.h similarity index 100% rename from trial4/include/mbedtls/aes.h rename to ch-resp-self/include/mbedtls/aes.h diff --git a/trial4/include/mbedtls/aesni.h b/ch-resp-self/include/mbedtls/aesni.h similarity index 100% rename from trial4/include/mbedtls/aesni.h rename to ch-resp-self/include/mbedtls/aesni.h diff --git a/trial4/include/mbedtls/arc4.h b/ch-resp-self/include/mbedtls/arc4.h similarity index 100% rename from trial4/include/mbedtls/arc4.h rename to ch-resp-self/include/mbedtls/arc4.h diff --git a/trial4/include/mbedtls/aria.h b/ch-resp-self/include/mbedtls/aria.h similarity index 100% rename from trial4/include/mbedtls/aria.h rename to ch-resp-self/include/mbedtls/aria.h diff --git a/trial4/include/mbedtls/asn1.h b/ch-resp-self/include/mbedtls/asn1.h similarity index 100% rename from trial4/include/mbedtls/asn1.h rename to ch-resp-self/include/mbedtls/asn1.h diff --git a/trial4/include/mbedtls/asn1write.h b/ch-resp-self/include/mbedtls/asn1write.h similarity index 100% rename from trial4/include/mbedtls/asn1write.h rename to ch-resp-self/include/mbedtls/asn1write.h diff --git a/trial4/include/mbedtls/base64.h b/ch-resp-self/include/mbedtls/base64.h similarity index 100% rename from trial4/include/mbedtls/base64.h rename to ch-resp-self/include/mbedtls/base64.h diff --git a/trial4/include/mbedtls/bignum.h b/ch-resp-self/include/mbedtls/bignum.h similarity index 100% rename from trial4/include/mbedtls/bignum.h rename to ch-resp-self/include/mbedtls/bignum.h diff --git a/trial4/include/mbedtls/blowfish.h b/ch-resp-self/include/mbedtls/blowfish.h similarity index 100% rename from trial4/include/mbedtls/blowfish.h rename to ch-resp-self/include/mbedtls/blowfish.h diff --git a/trial4/include/mbedtls/bn_mul.h b/ch-resp-self/include/mbedtls/bn_mul.h similarity index 100% rename from trial4/include/mbedtls/bn_mul.h rename to ch-resp-self/include/mbedtls/bn_mul.h diff --git a/trial4/include/mbedtls/camellia.h b/ch-resp-self/include/mbedtls/camellia.h similarity index 100% rename from trial4/include/mbedtls/camellia.h rename to ch-resp-self/include/mbedtls/camellia.h diff --git a/trial4/include/mbedtls/ccm.h b/ch-resp-self/include/mbedtls/ccm.h similarity index 100% rename from trial4/include/mbedtls/ccm.h rename to ch-resp-self/include/mbedtls/ccm.h diff --git a/trial4/include/mbedtls/certs.h b/ch-resp-self/include/mbedtls/certs.h similarity index 100% rename from trial4/include/mbedtls/certs.h rename to ch-resp-self/include/mbedtls/certs.h diff --git a/trial4/include/mbedtls/chacha20.h b/ch-resp-self/include/mbedtls/chacha20.h similarity index 100% rename from trial4/include/mbedtls/chacha20.h rename to ch-resp-self/include/mbedtls/chacha20.h diff --git a/trial4/include/mbedtls/chachapoly.h b/ch-resp-self/include/mbedtls/chachapoly.h similarity index 100% rename from trial4/include/mbedtls/chachapoly.h rename to ch-resp-self/include/mbedtls/chachapoly.h diff --git a/trial4/include/mbedtls/check_config.h b/ch-resp-self/include/mbedtls/check_config.h similarity index 100% rename from trial4/include/mbedtls/check_config.h rename to ch-resp-self/include/mbedtls/check_config.h diff --git a/trial4/include/mbedtls/cipher.h b/ch-resp-self/include/mbedtls/cipher.h similarity index 100% rename from trial4/include/mbedtls/cipher.h rename to ch-resp-self/include/mbedtls/cipher.h diff --git a/trial4/include/mbedtls/cipher_internal.h b/ch-resp-self/include/mbedtls/cipher_internal.h similarity index 100% rename from trial4/include/mbedtls/cipher_internal.h rename to ch-resp-self/include/mbedtls/cipher_internal.h diff --git a/trial4/include/mbedtls/cmac.h b/ch-resp-self/include/mbedtls/cmac.h similarity index 100% rename from trial4/include/mbedtls/cmac.h rename to ch-resp-self/include/mbedtls/cmac.h diff --git a/trial4/include/mbedtls/compat-1.3.h b/ch-resp-self/include/mbedtls/compat-1.3.h similarity index 100% rename from trial4/include/mbedtls/compat-1.3.h rename to ch-resp-self/include/mbedtls/compat-1.3.h diff --git a/trial4/include/mbedtls/config.h b/ch-resp-self/include/mbedtls/config.h similarity index 100% rename from trial4/include/mbedtls/config.h rename to ch-resp-self/include/mbedtls/config.h diff --git a/trial4/include/mbedtls/ctr_drbg.h b/ch-resp-self/include/mbedtls/ctr_drbg.h similarity index 100% rename from trial4/include/mbedtls/ctr_drbg.h rename to ch-resp-self/include/mbedtls/ctr_drbg.h diff --git a/trial4/include/mbedtls/debug.h b/ch-resp-self/include/mbedtls/debug.h similarity index 100% rename from trial4/include/mbedtls/debug.h rename to ch-resp-self/include/mbedtls/debug.h diff --git a/trial4/include/mbedtls/des.h b/ch-resp-self/include/mbedtls/des.h similarity index 100% rename from trial4/include/mbedtls/des.h rename to ch-resp-self/include/mbedtls/des.h diff --git a/trial4/include/mbedtls/dhm.h b/ch-resp-self/include/mbedtls/dhm.h similarity index 100% rename from trial4/include/mbedtls/dhm.h rename to ch-resp-self/include/mbedtls/dhm.h diff --git a/trial4/include/mbedtls/ecdh.h b/ch-resp-self/include/mbedtls/ecdh.h similarity index 100% rename from trial4/include/mbedtls/ecdh.h rename to ch-resp-self/include/mbedtls/ecdh.h diff --git a/trial4/include/mbedtls/ecdsa.h b/ch-resp-self/include/mbedtls/ecdsa.h similarity index 100% rename from trial4/include/mbedtls/ecdsa.h rename to ch-resp-self/include/mbedtls/ecdsa.h diff --git a/trial4/include/mbedtls/ecjpake.h b/ch-resp-self/include/mbedtls/ecjpake.h similarity index 100% rename from trial4/include/mbedtls/ecjpake.h rename to ch-resp-self/include/mbedtls/ecjpake.h diff --git a/trial4/include/mbedtls/ecp.h b/ch-resp-self/include/mbedtls/ecp.h similarity index 100% rename from trial4/include/mbedtls/ecp.h rename to ch-resp-self/include/mbedtls/ecp.h diff --git a/trial4/include/mbedtls/ecp_internal.h b/ch-resp-self/include/mbedtls/ecp_internal.h similarity index 100% rename from trial4/include/mbedtls/ecp_internal.h rename to ch-resp-self/include/mbedtls/ecp_internal.h diff --git a/trial4/include/mbedtls/entropy.h b/ch-resp-self/include/mbedtls/entropy.h similarity index 100% rename from trial4/include/mbedtls/entropy.h rename to ch-resp-self/include/mbedtls/entropy.h diff --git a/trial4/include/mbedtls/entropy_poll.h b/ch-resp-self/include/mbedtls/entropy_poll.h similarity index 100% rename from trial4/include/mbedtls/entropy_poll.h rename to ch-resp-self/include/mbedtls/entropy_poll.h diff --git a/trial4/include/mbedtls/error.h b/ch-resp-self/include/mbedtls/error.h similarity index 100% rename from trial4/include/mbedtls/error.h rename to ch-resp-self/include/mbedtls/error.h diff --git a/trial4/include/mbedtls/gcm.h b/ch-resp-self/include/mbedtls/gcm.h similarity index 100% rename from trial4/include/mbedtls/gcm.h rename to ch-resp-self/include/mbedtls/gcm.h diff --git a/trial4/include/mbedtls/havege.h b/ch-resp-self/include/mbedtls/havege.h similarity index 100% rename from trial4/include/mbedtls/havege.h rename to ch-resp-self/include/mbedtls/havege.h diff --git a/trial4/include/mbedtls/hkdf.h b/ch-resp-self/include/mbedtls/hkdf.h similarity index 100% rename from trial4/include/mbedtls/hkdf.h rename to ch-resp-self/include/mbedtls/hkdf.h diff --git a/trial4/include/mbedtls/hmac_drbg.h b/ch-resp-self/include/mbedtls/hmac_drbg.h similarity index 100% rename from trial4/include/mbedtls/hmac_drbg.h rename to ch-resp-self/include/mbedtls/hmac_drbg.h diff --git a/trial4/include/mbedtls/md.h b/ch-resp-self/include/mbedtls/md.h similarity index 100% rename from trial4/include/mbedtls/md.h rename to ch-resp-self/include/mbedtls/md.h diff --git a/trial4/include/mbedtls/md2.h b/ch-resp-self/include/mbedtls/md2.h similarity index 100% rename from trial4/include/mbedtls/md2.h rename to ch-resp-self/include/mbedtls/md2.h diff --git a/trial4/include/mbedtls/md4.h b/ch-resp-self/include/mbedtls/md4.h similarity index 100% rename from trial4/include/mbedtls/md4.h rename to ch-resp-self/include/mbedtls/md4.h diff --git a/trial4/include/mbedtls/md5.h b/ch-resp-self/include/mbedtls/md5.h similarity index 100% rename from trial4/include/mbedtls/md5.h rename to ch-resp-self/include/mbedtls/md5.h diff --git a/trial4/include/mbedtls/md_internal.h b/ch-resp-self/include/mbedtls/md_internal.h similarity index 100% rename from trial4/include/mbedtls/md_internal.h rename to ch-resp-self/include/mbedtls/md_internal.h diff --git a/trial4/include/mbedtls/memory_buffer_alloc.h b/ch-resp-self/include/mbedtls/memory_buffer_alloc.h similarity index 100% rename from trial4/include/mbedtls/memory_buffer_alloc.h rename to ch-resp-self/include/mbedtls/memory_buffer_alloc.h diff --git a/trial4/include/mbedtls/net.h b/ch-resp-self/include/mbedtls/net.h similarity index 100% rename from trial4/include/mbedtls/net.h rename to ch-resp-self/include/mbedtls/net.h diff --git a/trial4/include/mbedtls/net_sockets.h b/ch-resp-self/include/mbedtls/net_sockets.h similarity index 100% rename from trial4/include/mbedtls/net_sockets.h rename to ch-resp-self/include/mbedtls/net_sockets.h diff --git a/trial4/include/mbedtls/nist_kw.h b/ch-resp-self/include/mbedtls/nist_kw.h similarity index 100% rename from trial4/include/mbedtls/nist_kw.h rename to ch-resp-self/include/mbedtls/nist_kw.h diff --git a/trial4/include/mbedtls/oid.h b/ch-resp-self/include/mbedtls/oid.h similarity index 100% rename from trial4/include/mbedtls/oid.h rename to ch-resp-self/include/mbedtls/oid.h diff --git a/trial4/include/mbedtls/padlock.h b/ch-resp-self/include/mbedtls/padlock.h similarity index 100% rename from trial4/include/mbedtls/padlock.h rename to ch-resp-self/include/mbedtls/padlock.h diff --git a/trial4/include/mbedtls/pem.h b/ch-resp-self/include/mbedtls/pem.h similarity index 100% rename from trial4/include/mbedtls/pem.h rename to ch-resp-self/include/mbedtls/pem.h diff --git a/trial4/include/mbedtls/pk.h b/ch-resp-self/include/mbedtls/pk.h similarity index 100% rename from trial4/include/mbedtls/pk.h rename to ch-resp-self/include/mbedtls/pk.h diff --git a/trial4/include/mbedtls/pk_internal.h b/ch-resp-self/include/mbedtls/pk_internal.h similarity index 100% rename from trial4/include/mbedtls/pk_internal.h rename to ch-resp-self/include/mbedtls/pk_internal.h diff --git a/trial4/include/mbedtls/pkcs11.h b/ch-resp-self/include/mbedtls/pkcs11.h similarity index 100% rename from trial4/include/mbedtls/pkcs11.h rename to ch-resp-self/include/mbedtls/pkcs11.h diff --git a/trial4/include/mbedtls/pkcs12.h b/ch-resp-self/include/mbedtls/pkcs12.h similarity index 100% rename from trial4/include/mbedtls/pkcs12.h rename to ch-resp-self/include/mbedtls/pkcs12.h diff --git a/trial4/include/mbedtls/pkcs5.h b/ch-resp-self/include/mbedtls/pkcs5.h similarity index 100% rename from trial4/include/mbedtls/pkcs5.h rename to ch-resp-self/include/mbedtls/pkcs5.h diff --git a/trial4/include/mbedtls/platform.h b/ch-resp-self/include/mbedtls/platform.h similarity index 100% rename from trial4/include/mbedtls/platform.h rename to ch-resp-self/include/mbedtls/platform.h diff --git a/trial4/include/mbedtls/platform_time.h b/ch-resp-self/include/mbedtls/platform_time.h similarity index 100% rename from trial4/include/mbedtls/platform_time.h rename to ch-resp-self/include/mbedtls/platform_time.h diff --git a/trial4/include/mbedtls/platform_util.h b/ch-resp-self/include/mbedtls/platform_util.h similarity index 100% rename from trial4/include/mbedtls/platform_util.h rename to ch-resp-self/include/mbedtls/platform_util.h diff --git a/trial4/include/mbedtls/poly1305.h b/ch-resp-self/include/mbedtls/poly1305.h similarity index 100% rename from trial4/include/mbedtls/poly1305.h rename to ch-resp-self/include/mbedtls/poly1305.h diff --git a/trial4/include/mbedtls/psa_util.h b/ch-resp-self/include/mbedtls/psa_util.h similarity index 100% rename from trial4/include/mbedtls/psa_util.h rename to ch-resp-self/include/mbedtls/psa_util.h diff --git a/trial4/include/mbedtls/ripemd160.h b/ch-resp-self/include/mbedtls/ripemd160.h similarity index 100% rename from trial4/include/mbedtls/ripemd160.h rename to ch-resp-self/include/mbedtls/ripemd160.h diff --git a/trial4/include/mbedtls/rsa.h b/ch-resp-self/include/mbedtls/rsa.h similarity index 100% rename from trial4/include/mbedtls/rsa.h rename to ch-resp-self/include/mbedtls/rsa.h diff --git a/trial4/include/mbedtls/rsa_internal.h b/ch-resp-self/include/mbedtls/rsa_internal.h similarity index 100% rename from trial4/include/mbedtls/rsa_internal.h rename to ch-resp-self/include/mbedtls/rsa_internal.h diff --git a/trial4/include/mbedtls/sha1.h b/ch-resp-self/include/mbedtls/sha1.h similarity index 100% rename from trial4/include/mbedtls/sha1.h rename to ch-resp-self/include/mbedtls/sha1.h diff --git a/trial4/include/mbedtls/sha256.h b/ch-resp-self/include/mbedtls/sha256.h similarity index 100% rename from trial4/include/mbedtls/sha256.h rename to ch-resp-self/include/mbedtls/sha256.h diff --git a/trial4/include/mbedtls/sha512.h b/ch-resp-self/include/mbedtls/sha512.h similarity index 100% rename from trial4/include/mbedtls/sha512.h rename to ch-resp-self/include/mbedtls/sha512.h diff --git a/trial4/include/mbedtls/ssl.h b/ch-resp-self/include/mbedtls/ssl.h similarity index 100% rename from trial4/include/mbedtls/ssl.h rename to ch-resp-self/include/mbedtls/ssl.h diff --git a/trial4/include/mbedtls/ssl_cache.h b/ch-resp-self/include/mbedtls/ssl_cache.h similarity index 100% rename from trial4/include/mbedtls/ssl_cache.h rename to ch-resp-self/include/mbedtls/ssl_cache.h diff --git a/trial4/include/mbedtls/ssl_ciphersuites.h b/ch-resp-self/include/mbedtls/ssl_ciphersuites.h similarity index 100% rename from trial4/include/mbedtls/ssl_ciphersuites.h rename to ch-resp-self/include/mbedtls/ssl_ciphersuites.h diff --git a/trial4/include/mbedtls/ssl_cookie.h b/ch-resp-self/include/mbedtls/ssl_cookie.h similarity index 100% rename from trial4/include/mbedtls/ssl_cookie.h rename to ch-resp-self/include/mbedtls/ssl_cookie.h diff --git a/trial4/include/mbedtls/ssl_internal.h b/ch-resp-self/include/mbedtls/ssl_internal.h similarity index 100% rename from trial4/include/mbedtls/ssl_internal.h rename to ch-resp-self/include/mbedtls/ssl_internal.h diff --git a/trial4/include/mbedtls/ssl_ticket.h b/ch-resp-self/include/mbedtls/ssl_ticket.h similarity index 100% rename from trial4/include/mbedtls/ssl_ticket.h rename to ch-resp-self/include/mbedtls/ssl_ticket.h diff --git a/trial4/include/mbedtls/threading.h b/ch-resp-self/include/mbedtls/threading.h similarity index 100% rename from trial4/include/mbedtls/threading.h rename to ch-resp-self/include/mbedtls/threading.h diff --git a/trial4/include/mbedtls/timing.h b/ch-resp-self/include/mbedtls/timing.h similarity index 100% rename from trial4/include/mbedtls/timing.h rename to ch-resp-self/include/mbedtls/timing.h diff --git a/trial4/include/mbedtls/version.h b/ch-resp-self/include/mbedtls/version.h similarity index 100% rename from trial4/include/mbedtls/version.h rename to ch-resp-self/include/mbedtls/version.h diff --git a/trial4/include/mbedtls/x509.h b/ch-resp-self/include/mbedtls/x509.h similarity index 100% rename from trial4/include/mbedtls/x509.h rename to ch-resp-self/include/mbedtls/x509.h diff --git a/trial4/include/mbedtls/x509_crl.h b/ch-resp-self/include/mbedtls/x509_crl.h similarity index 100% rename from trial4/include/mbedtls/x509_crl.h rename to ch-resp-self/include/mbedtls/x509_crl.h diff --git a/trial4/include/mbedtls/x509_crt.h b/ch-resp-self/include/mbedtls/x509_crt.h similarity index 100% rename from trial4/include/mbedtls/x509_crt.h rename to ch-resp-self/include/mbedtls/x509_crt.h diff --git a/trial4/include/mbedtls/x509_csr.h b/ch-resp-self/include/mbedtls/x509_csr.h similarity index 100% rename from trial4/include/mbedtls/x509_csr.h rename to ch-resp-self/include/mbedtls/x509_csr.h diff --git a/trial4/include/mbedtls/xtea.h b/ch-resp-self/include/mbedtls/xtea.h similarity index 100% rename from trial4/include/mbedtls/xtea.h rename to ch-resp-self/include/mbedtls/xtea.h diff --git a/trial4/include/psa/crypto.h b/ch-resp-self/include/psa/crypto.h similarity index 100% rename from trial4/include/psa/crypto.h rename to ch-resp-self/include/psa/crypto.h diff --git a/trial4/include/psa/crypto_accel_driver.h b/ch-resp-self/include/psa/crypto_accel_driver.h similarity index 100% rename from trial4/include/psa/crypto_accel_driver.h rename to ch-resp-self/include/psa/crypto_accel_driver.h diff --git a/trial4/include/psa/crypto_compat.h b/ch-resp-self/include/psa/crypto_compat.h similarity index 100% rename from trial4/include/psa/crypto_compat.h rename to ch-resp-self/include/psa/crypto_compat.h diff --git a/trial4/include/psa/crypto_driver_common.h b/ch-resp-self/include/psa/crypto_driver_common.h similarity index 100% rename from trial4/include/psa/crypto_driver_common.h rename to ch-resp-self/include/psa/crypto_driver_common.h diff --git a/trial4/include/psa/crypto_entropy_driver.h b/ch-resp-self/include/psa/crypto_entropy_driver.h similarity index 100% rename from trial4/include/psa/crypto_entropy_driver.h rename to ch-resp-self/include/psa/crypto_entropy_driver.h diff --git a/trial4/include/psa/crypto_extra.h b/ch-resp-self/include/psa/crypto_extra.h similarity index 100% rename from trial4/include/psa/crypto_extra.h rename to ch-resp-self/include/psa/crypto_extra.h diff --git a/trial4/include/psa/crypto_platform.h b/ch-resp-self/include/psa/crypto_platform.h similarity index 100% rename from trial4/include/psa/crypto_platform.h rename to ch-resp-self/include/psa/crypto_platform.h diff --git a/trial4/include/psa/crypto_se_driver.h b/ch-resp-self/include/psa/crypto_se_driver.h similarity index 100% rename from trial4/include/psa/crypto_se_driver.h rename to ch-resp-self/include/psa/crypto_se_driver.h diff --git a/trial4/include/psa/crypto_sizes.h b/ch-resp-self/include/psa/crypto_sizes.h similarity index 100% rename from trial4/include/psa/crypto_sizes.h rename to ch-resp-self/include/psa/crypto_sizes.h diff --git a/trial4/include/psa/crypto_struct.h b/ch-resp-self/include/psa/crypto_struct.h similarity index 100% rename from trial4/include/psa/crypto_struct.h rename to ch-resp-self/include/psa/crypto_struct.h diff --git a/trial4/include/psa/crypto_types.h b/ch-resp-self/include/psa/crypto_types.h similarity index 100% rename from trial4/include/psa/crypto_types.h rename to ch-resp-self/include/psa/crypto_types.h diff --git a/trial4/include/psa/crypto_values.h b/ch-resp-self/include/psa/crypto_values.h similarity index 100% rename from trial4/include/psa/crypto_values.h rename to ch-resp-self/include/psa/crypto_values.h diff --git a/ch-resp-self/keys/Alias_priv.pem b/ch-resp-self/keys/Alias_priv.pem new file mode 100644 index 0000000..230055a --- /dev/null +++ b/ch-resp-self/keys/Alias_priv.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpAIBAAKCAQEAr6sq5kOG6A/12geq+/i8Ta2BnaMGqxLR4a9PciukW7awogS9 +WNpA8DlWV2B1M5z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+cZiwQYjlo/bFpyZPo +AetENYLMwjVlUEfWrR6uJmzLMLFu+6eQe+l+JSlVKhgbHjJ2SKmpefC3jQxM32Xz +R5Wtj8AIxqMpmtxI8O5EqQKBgQCQ4oPGZHEF475oeI/jMt6iyRkgnrJqgs6bVs+V +FdfHlD0Xxni1OSoM4EYLcGIZabUMLXxPbTfC+I4D4nsOhcbGpjxuds5d2CephWXZ ++ndwTU9p+GoUpQRdXi+c/+6Hw4aUtj+arqO8zKIP8UeX2+CuC0KPjFkQ8PJ0zsiL +im/vcQKBgQClGriNpXHBH1Sge07qtsw8JnySjOfrrPXyGyeLzlkD6kRrB+Wr1VpN +mDWr4yHLLdJnPl3V1gdSPLI/2e+gaDoT8qRnsAaJfh1ItA0LfKad4kycHsE+VQJ6 +phDsZ6iqIkgD5r6+14Lsv0YMRxnnvQGPwvQs9TqJqK6/Coqf3pfw/w== +-----END RSA PRIVATE KEY----- diff --git a/ch-resp-self/keys/Alias_pub.pem b/ch-resp-self/keys/Alias_pub.pem new file mode 100644 index 0000000..cce3af4 --- /dev/null +++ b/ch-resp-self/keys/Alias_pub.pem @@ -0,0 +1,9 @@ +-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAr6sq5kOG6A/12geq+/i8 +Ta2BnaMGqxLR4a9PciukW7awogS9WNpA8DlWV2B1M5zSZSKPPS9PDdC/JqXSiMWt +5fHZpRCyZ3Zokclc/V8TWgDkRxZFxHkPWUDshUIXaMzwj+eJvm2qH+LWrjr0zxqv +Kj2a8qFs0gYMqGB1jGun/N41Tz8B/QmWjeakd8Zr3iY6cxVqd4GvUTgn/KC4YeZ2 +/CkdQTPQx6fdYrVHF0DMqrAZCSnsyRAa02oAZhiBzz4gw//fB5+k42/+Mrzrnmv/ +l4HnQwnGPIBQK4IDYe7YyOt7ZWRFRkQydwHXE5fVifjrmKOj0vM1tRKjfZ1CoRxE +FQIDAQAB +-----END PUBLIC KEY----- diff --git a/ch-resp-self/keys/Identity_pub.pem b/ch-resp-self/keys/Identity_pub.pem new file mode 100644 index 0000000..6847cee --- /dev/null +++ b/ch-resp-self/keys/Identity_pub.pem @@ -0,0 +1,9 @@ +-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1FomNTVE/DdCHc0JAOZW +6BC6zwcZOklne1FFni0EXJYNL4mYXyDvigv6zOQObjYtgKIwj01WSxAA1/4Ecjfc +Vt6sR+I0ufEjoSDF/WX+5jFc/k5ldnWwZzBBEfZVSuZu8LAhqpj7woY95x9QzvNG +Kq0neEIonihRSnQTfwingDsKd6+ci0H85Pi7lJ9bGpVTGlE9AMQBQvHRlnl3Ig+L +7UDeNN4CDAXYvIqXTq0RQ+OvdvMYg1AfZ4rGoa91Cw208zb3FCnGIpCQWGUSDypd +Qgo0ptQU8UiaTmF0hW0q3TeG8763uMKQA3QVZIASA6hp2oMVcDjeWo8+pd7Ig2iq +sQIDAQAB +-----END PUBLIC KEY----- diff --git a/ch-resp-self/keys/session1_priv.pem b/ch-resp-self/keys/session1_priv.pem new file mode 100644 index 0000000..f36fb58 --- /dev/null +++ b/ch-resp-self/keys/session1_priv.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpAIBAAKCAQEAxjNp2QVTj7a31kgNwQ8ATisSfcAfg002bDZEeXi3NrgQJNyG +Rsz9x0aYWxz5iT2c5aj8WNL3jzAdbm4RH3gV309XIaRmuivU5ICkW4glxFpDeG0A ++I1Wf2Yu5e/0FNPTSYah5tNyGNbh9jfacqu5SfA3ejsvOIGRs2WahtcPw3F1IbWP +FiapRf0o8m2s2ihSugCwdkA5mRq0svJ7xJpU32FRti1DEHcVNJ1Q2ZuvkzJuVywF +c1kZwh/Ou6ED45aj27Xidbt1rPX6cmZvt11xzx0MHNrvUiToR158IbHjjQZx2oyP +Z8qSwkHPuMp7kVFZRxz1/4hARxJSaVXfiXJmKwIDAQABAo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gQCUM/P3p89QWMC80bYujNGD1dIBEEwvby9xgTTw8DeumOHpVwUp60hS +kOHP1biCT2nBihfHqFbs21XiYhZuywFEYWv44PziFXMdIuAYXKZ6JRcR04bg3vpW +j3VPiLbW9/5Wl4fmaWh+P4nGQPK+m3fDnfQrTDqLf2tb8IxPkXDiig== +-----END RSA PRIVATE KEY----- diff --git a/ch-resp-self/keys/session1_pub.pem b/ch-resp-self/keys/session1_pub.pem new file mode 100644 index 0000000..184735c --- /dev/null +++ b/ch-resp-self/keys/session1_pub.pem @@ -0,0 +1,9 @@ +-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxjNp2QVTj7a31kgNwQ8A +TisSfcAfg002bDZEeXi3NrgQJNyGRsz9x0aYWxz5iT2c5aj8WNL3jzAdbm4RH3gV +309XIaRmuivU5ICkW4glxFpDeG0A+I1Wf2Yu5e/0FNPTSYah5tNyGNbh9jfacqu5 +SfA3ejsvOIGRs2WahtcPw3F1IbWPFiapRf0o8m2s2ihSugCwdkA5mRq0svJ7xJpU +32FRti1DEHcVNJ1Q2ZuvkzJuVywFc1kZwh/Ou6ED45aj27Xidbt1rPX6cmZvt11x +zx0MHNrvUiToR158IbHjjQZx2oyPZ8qSwkHPuMp7kVFZRxz1/4hARxJSaVXfiXJm +KwIDAQAB +-----END PUBLIC KEY----- diff --git a/trial4/links.txt b/ch-resp-self/links.txt similarity index 100% rename from trial4/links.txt rename to ch-resp-self/links.txt diff --git a/trial4/main b/ch-resp-self/main similarity index 100% rename from trial4/main rename to ch-resp-self/main diff --git a/ch-resp-self/main.c b/ch-resp-self/main.c new file mode 100644 index 0000000..af7062f --- /dev/null +++ b/ch-resp-self/main.c @@ -0,0 +1,202 @@ +#include "ROMprotocol.h" +#include "Stage2.h" + +int main() +{ + printf("Hello World!\n"); + + DIMASTATUS ret = 0; + + /*lock all resources, no interruptons*/ + /*unlock Secure Storage to read UDS and write DID Priv key*/ + + ret = ROMprotocol(); + + /*lock Secure Storage*/ + + + //ALIAS and session keys, firmware execution + + //measure firmware.bin + //measure firmware.conf + //measure .... + //calculate FW_ID - composite hash of all above measurements + //create ALIAS KD_ctx + //keygen + //publish keys + + + + //Session key creation + //receive session nonce from verifier? + //placeholder + char * PERS = "session1"; + + KeyDrv_context SSN1_ctx; + SSN1_ctx.ENT_MODE = SW_PRNG; //non determ, gen new key for every session + SSN1_ctx.PKC_MODE = DFL_PKC; + SSN1_ctx.seed = NULL; + SSN1_ctx.phrase = PERS; + SSN1_ctx.KEY_FORM = DFL_FORM; + + printf("Generating Session keys\n"); + + ret = AsymmKeyGen(&SSN1_ctx); + if(ret < DIMASUCCESS) + { + perror("DIMAFAILURE : SESSION key gen failed\n"); + exit(DIMAFAILURE); + } + + /////////////////KEY gen protocol ends here + /////////////////DID Priv key is purged/secure, other keys are available for use + + //////////////////////Now STAGE 2 protocols/////////////////// + //read verifier signing key + //load connected nodes information + //wait for connection init + //recv prover info + //load prover Pubkey + //challenge NONCE N + //sign N with Aik + //Encrypt N with Pub-Prv + //sendNonce() + //wait + //recv Resp R + //Decrypt R with Aik + //Verify signature with Pub-prv + //verify N + //issue ACK + //close conn. + + + mbedtls_pk_context pk_ctx; + mbedtls_pk_init(&pk_ctx); + + //mbedtls_entropy_context entropyCtx; + //mbedtls_entropy_init(&entropyCtx); + + //mbedtls_ctr_drbg_context drbgCtx; + //mbedtls_ctr_drbg_init(&drbgCtx); + + //ret = mbedtls_ctr_drbg_seed(&drbgCtx, mbedtls_entropy_func, &entropyCtx, NULL, 0); + if(ret < DIMASUCCESS) + { + perror("DIMAFAILURE : CRT DRBG failed\n"); + exit(DIMAFAILURE); + } + + if(DEBUG) {printf("Loading signing key\n");} + ret = mbedtls_pk_parse_keyfile( &pk_ctx, "keys/Alias_priv.pem", "" ); + if(ret < DIMASUCCESS) + { + perror("DIMAPKFAILURE : Failed to load signing key\n"); + exit(DIMAPKFAILURE); + } + +////////////// Key capability check /////////// + ret = mbedtls_pk_can_do(&pk_ctx, MBEDTLS_PK_ECKEY); //1 - can; 0 - cannot + if(!ret) + { + perror("DIMAPKFAILURE : This key cannot perform EC Key operations\n"); + + } + if (DEBUG) {printf("successful load signing key\n");} + ret = mbedtls_pk_can_do(&pk_ctx, MBEDTLS_PK_ECDSA); + if(!ret) + { + perror("DIMAPKFAILURE : This key cannot perform ECDSA operations\n"); + + } + ret = mbedtls_pk_can_do(&pk_ctx, MBEDTLS_PK_ECKEY_DH); + if(!ret) + { + perror("DIMAPKFAILURE : This key cannot perform EC DHM operations\n"); + + } +////////////// Key check end /////////// + +////////////// load client info //////// + Client_info * Cl_list = calloc(1, sizeof(Client_info)*CL_NOS); + + ret = load_nodes(Cl_list); + + printf("Client list complete, waiting for Client to init..\n"); + + +////////////// wait for conn init ////// + + + +////////////// active clients ///////// + printf("client ID : %s\n", Cl_list[1].cli_ID); + printf("client Pubkey at : %s\n", Cl_list[1].pub_file); + + + //for each active client + //sign NONCE + //send NONCE and sig + + //cacl hash + + uint8_t* sign = calloc(1,sizeof(uint8_t)*MBEDTLS_MPI_MAX_SIZE);//MBEDTLS_ECDSA_MAX_LEN); + size_t signlen = 0; + + ret = challenge( &pk_ctx, &Cl_list[1], sign, &signlen); +/* + if(DEBUG) + { + for(int i = 0; i < NONCE_SIZE; i++) + printf("%hhx",Cl_list[1].NONCE[i]); + printf(" : NONCE main\n"); + } + + if(DEBUG) + { + for (int i = 0; i < signlen; i++) + printf("%hhx", sign[i]); + printf(" :signature main\n" ); + + } +*/ + + //net send (Cl_list[1].NONCE); + //net send (sign); + + //net recv (response) + + //verify + //ret = verify(&Cl_list[1], &response); + + + mbedtls_pk_context pubk_ctx; + mbedtls_pk_init( &pubk_ctx ); + + + ret = mbedtls_pk_parse_public_keyfile( &pubk_ctx, "keys/Alias_pub.pem" ); + if(ret < DIMASUCCESS) + { + perror("DIMAPKFAILURE : Public key failure"); + return DIMAPKFAILURE; + } + + ret = response( &pubk_ctx, &Cl_list[1], sign, signlen); + if (ret < DIMASUCCESS) + { + perror("DIMAVERIFYFAILURE : could not verify client\n"); + return DIMAVERIFYFAILURE; + } + + + if(Cl_list[1].Cli_STATUS == Cl_verfd) + { printf( "\n . OK (the signature is valid)\n\n" ); } + + + + + /*release resources, pass control to firmware, etc */ + + printf("Successful exit\n"); + + return 1; +} diff --git a/trial4/makefile b/ch-resp-self/makefile similarity index 54% rename from trial4/makefile rename to ch-resp-self/makefile index 3631e7e..ee1b233 100644 --- a/trial4/makefile +++ b/ch-resp-self/makefile @@ -2,7 +2,7 @@ CC=gcc IDIR=./include LDIR=./include ODIR=./out -_DEPS = ROMprotocol.h KeyGen.h defines.h +_DEPS = ROMprotocol.h KeyGen.h Stage2.h defines.h DEPS = $(pathsbst %,(IDIR)/%,%(_DEPS)) @@ -11,18 +11,18 @@ CFLAGS= -I. -T$(IDIR) .PHONY: all debug clean -all: main.c ROMprotocol.c KeyGen.c - ${CC} -o $(ODIR)/main main.c KeyGen.c ROMprotocol.c -lm -lmbedcrypto -lmbedtls -lmbedx509 +all: main.c ROMprotocol.c KeyGen.c Stage2.c + ${CC} -o $(ODIR)/main main.c KeyGen.c ROMprotocol.c Stage2.c -lm -lmbedcrypto -lmbedtls -lmbedx509 debug: - ${CC} -gdwarf-2 -g3 -o $(ODIR)/dbg-main main.c KeyGen.c ROMprotocol.c -lm -lmbedcrypto -lmbedtls -lmbedx509 + ${CC} -gdwarf-2 -g3 -o $(ODIR)/dbg-main main.c KeyGen.c ROMprotocol.c Stage2.c -lm -lmbedcrypto -lmbedtls -lmbedx509 trial: ${CC} -g -o $(ODIR)/trial ECCtrial.c -lm -lmbedcrypto -lmbedtls -lmbedx509 remake: rm -r $(ODIR)/* - ${CC} -o $(ODIR)/main main.c KeyGen.c ROMprotocol.c -lm -lmbedcrypto -lmbedtls -lmbedx509 + ${CC} -o $(ODIR)/main main.c KeyGen.c ROMprotocol.c Stage2.c -lm -lmbedcrypto -lmbedtls -lmbedx509 clean: rm -r $(ODIR)/* diff --git a/ch-resp-self/out/main b/ch-resp-self/out/main new file mode 100755 index 0000000000000000000000000000000000000000..b8fe6b29aae921d2fae5a9f0521902f349144c09 GIT binary patch literal 23368 zcmeHvdw5jUx%W;27!^Y574f#c-~lTkpdivB31q^Kl8`2V_Ea5)%!EXe%ycq?;3qxQ zI3A|yv>cC6tnJtIa{RD8?MLgSkqQLRiCXJHZ51zVqg6U1Sn*O$s;xP{-@44KnasBJ zJm>szp64tc^6vMy-u13`y=$#^?Y;J%^$(sUwZ%n6mQE$sl@_^`r%9wrWt1*c7a&#E zTL%SgF>uRN*C{EH}4U0{QeTC8w#jkaVodD?~z9NK{kH zvIW3$v~|*_1q*763r&Y<5EG3O$rgWU9?MNt<)*4~np(27kYkmLUL+7yWm;$bS}w7aGs+xZrUY{a3r-^IYuzs*C>L zxZo`=dfHv^dtLAeF8B>D_zo9*0qnH#KR^A*#Sgn&^y~+Ie!dd$KX&P_b{G5|=qa~O zx5}&R9BpF}%*(Aw)}%cAPeOjuDEU7L{U=)GC+DcK8if55tw(0$;uhAK&Q$?_OL%=K z66E@FspYL(R`2x(!hzN8-H||eS^c7pU{_$7Z&gRY@_JWy2D`l75nnjs^-9r#f>avm z==O%zc)J6UXvoq)xZCFqtP2IhkqiWxwSjPZ>-r4R>G!sGwFbSd;b5mXvOW~Z_Yz1QdWd%J_ta7(rjDp(zeL+z;6Ffh}Ua3HHsSzS<2xwX^R74>yw^r{lADAL`Q(@vdZ>KAP{ zjL6uZQ)31V`?~zW95=N1y1f2ie(h#gXPg*{uFCH|ctxz=5jY)(d z)3V0f(zeFi>TB*xr!Sly9u2TF7XI$J{Pt=5)~V0VCEix0}gn6+BN z0iWOM?g#`z(AKif$C`Z|?KexoPNFnJP1H_bdzaNJE${{~b9~5O)!i+#EpMR9Z!KO@ zw{VenR>jQAGMCw_SrxMxHxL{}D#lgznmEEs2GKI4SviU7`)SGPzgnM`*0jjV{wuMT ziI^wL-1$#iaXUW7Izhxo-0!xxPv9Nzsfv$IZa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wp7xQ{?1e1!M{F=ktg_osR5qL~f z!LygpSvb*Xt#|a%I?|zdr;45vhaOdTukY+c{6ch>$I0YZZJsTYo2Q$^freMFIVTb2 z^qu%dr2-X2e5~H4j&7st58S8st}{40+$u5gJ2_g>uObq!+R>i zL2*7#MW9WsjBS1>(VQ$Qmq=McU!w+JXL}25;_*5a7>HH{mgi2)u>$uE9~a_n3Lg2e zS0R($_tRAG=c{ZXtFK8fz<=(c>+<>MW!lIy6K-pA(oAq>dA*OQ>4iDcxo6`rs|Nq^ zsxGMO*ZYl{&Q;}c`zVs$w^yvyfD683(B<`ehzwN)aeF1&uFLE90V{yx5g=1uzt_-I zzsG=xNc6RtZUDn~1iF5`&#CDxN?6;k4{X{(vyV9fG* zzgAP5ons{Z&R)|yk!P0I`?{KHIjut5ujx1Q%IoJqO;_b@h34z~ZeDr)-c3{e{z=!L z-~M}5dEI~dd0Epw?O3Hi+pYEeIIq0kch;2tF;jm1+=rn5bp3jNT2pa?ilHFC{>PEW zy - - - - layer1.c - layer2.c - main.c - - - nbproject/private/launcher.properties - makefile - - - ^(nbproject)$ - - . - - makefile - - - - default - false - false - - - - - - . - ${MAKE} -f makefile - ${MAKE} -f makefile clean - ./out/main - - - . - - - - - - - - - - - - diff --git a/trial4/nbproject/private/CodeAssistancePathMapper.properties b/trial4/nbproject/private/CodeAssistancePathMapper.properties deleted file mode 100644 index 7f5ded8..0000000 --- a/trial4/nbproject/private/CodeAssistancePathMapper.properties +++ /dev/null @@ -1 +0,0 @@ -# Automatic path mapper. CRC = 1 diff --git a/trial4/nbproject/private/Default-build.log b/trial4/nbproject/private/Default-build.log deleted file mode 100644 index e375ab1..0000000 --- a/trial4/nbproject/private/Default-build.log +++ /dev/null @@ -1 +0,0 @@ -gcc -o ./out/main main.c layer1.c layer2.c -lm -lmbedcrypto -lmbedtls -lmbedx509 diff --git a/trial4/nbproject/private/Default-exec.log b/trial4/nbproject/private/Default-exec.log deleted file mode 100644 index 1bfffae..0000000 --- a/trial4/nbproject/private/Default-exec.log +++ /dev/null @@ -1,73 +0,0 @@ -called: gcc - /home/atul/Projects/GIT/RIoT/openSSL-DICE/trial3 - gcc - -o - ./out/main - main.c - layer1.c - layer2.c - -lm - -lmbedcrypto - -lmbedtls - -lmbedx509 - -called: /usr/bin/ld - /home/atul/Projects/GIT/RIoT/openSSL-DICE/trial3 - /usr/bin/ld - -plugin - /usr/lib/gcc/x86_64-linux-gnu/7/liblto_plugin.so - -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper - -plugin-opt=-fresolution=/tmp/ccYhvDjB.res - -plugin-opt=-pass-through=-lgcc - -plugin-opt=-pass-through=-lgcc_s - -plugin-opt=-pass-through=-lc - -plugin-opt=-pass-through=-lgcc - -plugin-opt=-pass-through=-lgcc_s - --sysroot=/ - --build-id - --eh-frame-hdr - -m - elf_x86_64 - --hash-style=gnu - --as-needed - -dynamic-linker - /lib64/ld-linux-x86-64.so.2 - -pie - -z - now - -z - relro - -o - ./out/main - /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/Scrt1.o - /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/crti.o - /usr/lib/gcc/x86_64-linux-gnu/7/crtbeginS.o - -L/usr/lib/gcc/x86_64-linux-gnu/7 - -L/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu - -L/usr/lib/gcc/x86_64-linux-gnu/7/../../../../lib - -L/lib/x86_64-linux-gnu - -L/lib/../lib - -L/usr/lib/x86_64-linux-gnu - -L/usr/lib/../lib - -L/usr/lib/gcc/x86_64-linux-gnu/7/../../.. - /tmp/ccFS4XDz.o - /tmp/ccUxoFtf.o - /tmp/ccdM7foV.o - -lm - -lmbedcrypto - -lmbedtls - -lmbedx509 - -lgcc - --push-state - --as-needed - -lgcc_s - --pop-state - -lc - -lgcc - --push-state - --as-needed - -lgcc_s - --pop-state - /usr/lib/gcc/x86_64-linux-gnu/7/crtendS.o - /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/crtn.o - diff --git a/trial4/nbproject/private/Default.properties b/trial4/nbproject/private/Default.properties deleted file mode 100644 index d1c26be..0000000 --- a/trial4/nbproject/private/Default.properties +++ /dev/null @@ -1,3 +0,0 @@ -/home/atul/Projects/GIT/RIoT/openSSL-DICE/trial3/layer1.c=/home/atul/Projects/GIT/RIoT/openSSL-DICE/trial3#-o ./out/main main.c layer1.c layer2.c -lm -lmbedcrypto -lmbedtls -lmbedx509 -/home/atul/Projects/GIT/RIoT/openSSL-DICE/trial3/main.c=/home/atul/Projects/GIT/RIoT/openSSL-DICE/trial3#-o ./out/main main.c layer1.c layer2.c -lm -lmbedcrypto -lmbedtls -lmbedx509 -/home/atul/Projects/GIT/RIoT/openSSL-DICE/trial3/layer2.c=/home/atul/Projects/GIT/RIoT/openSSL-DICE/trial3#-o ./out/main main.c layer1.c layer2.c -lm -lmbedcrypto -lmbedtls -lmbedx509 diff --git a/trial4/nbproject/private/c_standard_headers_indexer.c b/trial4/nbproject/private/c_standard_headers_indexer.c deleted file mode 100644 index c2548d2..0000000 --- a/trial4/nbproject/private/c_standard_headers_indexer.c +++ /dev/null @@ -1,75 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. - * - * Oracle and Java are registered trademarks of Oracle and/or its affiliates. - * Other names may be trademarks of their respective owners. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common - * Development and Distribution License("CDDL") (collectively, the - * "License"). You may not use this file except in compliance with the - * License. You can obtain a copy of the License at - * http://www.netbeans.org/cddl-gplv2.html - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the - * specific language governing permissions and limitations under the - * License. When distributing the software, include this License Header - * Notice in each file and include the License file at - * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the GPL Version 2 section of the License file that - * accompanied this code. If applicable, add the following below the - * License Header, with the fields enclosed by brackets [] replaced by - * your own identifying information: - * "Portions Copyrighted [year] [name of copyright owner]" - * - * If you wish your version of this file to be governed by only the CDDL - * or only the GPL Version 2, indicate your decision by adding - * "[Contributor] elects to include this software in this distribution - * under the [CDDL or GPL Version 2] license." If you do not indicate a - * single choice of license, a recipient has the option to distribute - * your version of this file under either the CDDL, the GPL Version 2 or - * to extend the choice of license to its licensees as provided above. - * However, if you add GPL Version 2 code and therefore, elected the GPL - * Version 2 license, then the option applies only if the new code is - * made subject to such option by the copyright holder. - * - * Contributor(s): - */ - -// List of standard headers was taken in http://en.cppreference.com/w/c/header - -#include // Conditionally compiled macro that compares its argument to zero -#include // Functions to determine the type contained in character data -#include // Macros reporting error conditions -#include // Limits of float types -#include // Sizes of basic types -#include // Localization utilities -#include // Common mathematics functions -#include // Nonlocal jumps -#include // Signal handling -#include // Variable arguments -#include // Common macro definitions -#include // Input/output -#include // String handling -#include // General utilities: memory management, program utilities, string conversions, random numbers -#include // Time/date utilities -#include // (since C95) Alternative operator spellings -#include // (since C95) Extended multibyte and wide character utilities -#include // (since C95) Wide character classification and mapping utilities -#ifdef _STDC_C99 -#include // (since C99) Complex number arithmetic -#include // (since C99) Floating-point environment -#include // (since C99) Format conversion of integer types -#include // (since C99) Boolean type -#include // (since C99) Fixed-width integer types -#include // (since C99) Type-generic math (macros wrapping math.h and complex.h) -#endif -#ifdef _STDC_C11 -#include // (since C11) alignas and alignof convenience macros -#include // (since C11) Atomic types -#include // (since C11) noreturn convenience macros -#include // (since C11) Thread library -#include // (since C11) UTF-16 and UTF-32 character utilities -#endif diff --git a/trial4/nbproject/private/configurations.xml b/trial4/nbproject/private/configurations.xml deleted file mode 100644 index 7534ff3..0000000 --- a/trial4/nbproject/private/configurations.xml +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - aes.h - aesni.h - arc4.h - aria.h - asn1.h - asn1write.h - base64.h - bignum.h - blowfish.h - bn_mul.h - camellia.h - ccm.h - certs.h - chacha20.h - chachapoly.h - check_config.h - cipher.h - cipher_internal.h - cmac.h - compat-1.3.h - config.h - ctr_drbg.h - debug.h - des.h - dhm.h - ecdh.h - ecdsa.h - ecjpake.h - ecp.h - ecp_internal.h - entropy.h - entropy_poll.h - error.h - gcm.h - havege.h - hkdf.h - hmac_drbg.h - md.h - md2.h - md4.h - md5.h - md_internal.h - memory_buffer_alloc.h - net.h - net_sockets.h - nist_kw.h - oid.h - padlock.h - pem.h - pk.h - pk_internal.h - pkcs11.h - pkcs12.h - pkcs5.h - platform.h - platform_time.h - platform_util.h - poly1305.h - ripemd160.h - rsa.h - rsa_internal.h - sha1.h - sha256.h - sha512.h - ssl.h - ssl_cache.h - ssl_ciphersuites.h - ssl_cookie.h - ssl_internal.h - ssl_ticket.h - threading.h - timing.h - version.h - x509.h - x509_crl.h - x509_crt.h - x509_csr.h - xtea.h - - - - - - - ECCtrial.c - defines.h - layer1.c - layer1.h - layer2.c - layer2.h - main.c - - - makefile - - - - localhost - 2 - - - - . - ${AUTO_FOLDER} - - ${AUTO_FOLDER} - - ${MAKE} ${ITEM_NAME}.o - ${AUTO_COMPILE} - - ${AUTO_COMPILE} - - - - - - - - - - - - - - - gdb - - - - "${OUTPUT_PATH}" - - "${OUTPUT_PATH}" - . - false - 0 - 0 - - - - - - diff --git a/trial4/nbproject/private/cpp_standard_headers_indexer.cpp b/trial4/nbproject/private/cpp_standard_headers_indexer.cpp deleted file mode 100644 index 04f6fa6..0000000 --- a/trial4/nbproject/private/cpp_standard_headers_indexer.cpp +++ /dev/null @@ -1,135 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. - * - * Oracle and Java are registered trademarks of Oracle and/or its affiliates. - * Other names may be trademarks of their respective owners. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common - * Development and Distribution License("CDDL") (collectively, the - * "License"). You may not use this file except in compliance with the - * License. You can obtain a copy of the License at - * http://www.netbeans.org/cddl-gplv2.html - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the - * specific language governing permissions and limitations under the - * License. When distributing the software, include this License Header - * Notice in each file and include the License file at - * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the GPL Version 2 section of the License file that - * accompanied this code. If applicable, add the following below the - * License Header, with the fields enclosed by brackets [] replaced by - * your own identifying information: - * "Portions Copyrighted [year] [name of copyright owner]" - * - * If you wish your version of this file to be governed by only the CDDL - * or only the GPL Version 2, indicate your decision by adding - * "[Contributor] elects to include this software in this distribution - * under the [CDDL or GPL Version 2] license." If you do not indicate a - * single choice of license, a recipient has the option to distribute - * your version of this file under either the CDDL, the GPL Version 2 or - * to extend the choice of license to its licensees as provided above. - * However, if you add GPL Version 2 code and therefore, elected the GPL - * Version 2 license, then the option applies only if the new code is - * made subject to such option by the copyright holder. - * - * Contributor(s): - */ - -// List of standard headers was taken in http://en.cppreference.com/w/cpp/header - -#include // General purpose utilities: program control, dynamic memory allocation, random numbers, sort and search -#include // Functions and macro constants for signal management -#include // Macro (and function) that saves (and jumps) to an execution context -#include // Handling of variable length argument lists -#include // Runtime type information utilities -#include // std::bitset class template -#include // Function objects, designed for use with the standard algorithms -#include // Various utility components -#include // C-style time/date utilites -#include // typedefs for types such as size_t, NULL and others -#include // Low-level memory management utilities -#include // Higher level memory management utilities -#include // limits of integral types -#include // limits of float types -#include // standardized way to query properties of arithmetic types -#include // Exception handling utilities -#include // Standard exception objects -#include // Conditionally compiled macro that compares its argument to zero -#include // Macro containing the last error number -#include // functions to determine the type contained in character data -#include // functions for determining the type of wide character data -#include // various narrow character string handling functions -#include // various wide and multibyte string handling functions -#include // std::basic_string class template -#include // std::vector container -#include // std::deque container -#include // std::list container -#include // std::set and std::multiset associative containers -#include // std::map and std::multimap associative containers -#include // std::stack container adaptor -#include // std::queue and std::priority_queue container adaptors -#include // Algorithms that operate on containers -#include // Container iterators -#include // Common mathematics functions -#include // Complex number type -#include // Class for representing and manipulating arrays of values -#include // Numeric operations on values in containers -#include // forward declarations of all classes in the input/output library -#include // std::ios_base class, std::basic_ios class template and several typedefs -#include // std::basic_istream class template and several typedefs -#include // std::basic_ostream, std::basic_iostream class templates and several typedefs -#include // several standard stream objects -#include // std::basic_fstream, std::basic_ifstream, std::basic_ofstream class templates and several typedefs -#include // std::basic_stringstream, std::basic_istringstream, std::basic_ostringstream class templates and several typedefs -#include // std::strstream, std::istrstream, std::ostrstream(deprecated) -#include // Helper functions to control the format or input and output -#include // std::basic_streambuf class template -#include // C-style input-output functions -#include // Localization utilities -#include // C localization utilities -#include // empty header. The macros that appear in iso646.h in C are keywords in C++ -#if __cplusplus >= 201103L -#include // (since C++11) std::type_index -#include // (since C++11) Compile-time type information -#include // (since C++11) C++ time utilites -#include // (since C++11) std::initializer_list class template -#include // (since C++11) std::tuple class template -#include // (since C++11) Nested allocator class -#include // (since C++11) fixed-size types and limits of other types -#include // (since C++11) formatting macros , intmax_t and uintmax_t math and conversions -#include // (since C++11) defines std::error_code, a platform-dependent error code -#include // (since C++11) C-style Unicode character conversion functions -#include // (since C++11) std::array container -#include // (since C++11) std::forward_list container -#include // (since C++11) std::unordered_set and std::unordered_multiset unordered associative containers -#include // (since C++11) std::unordered_map and std::unordered_multimap unordered associative containers -#include // (since C++11) Random number generators and distributions -#include // (since C++11) Compile-time rational arithmetic -#include // (since C++11) Floating-point environment access functions -#include // (since C++11) Unicode conversion facilities -#include // (since C++11) Classes, algorithms and iterators to support regular expression processing -#include // (since C++11) Atomic operations library -#include // (since C++11)(deprecated in C++17) simply includes the header -#include // (since C++11)(deprecated in C++17) simply includes the headers (until C++17) (since C++17) and : the overloads equivalent to the contents of the C header tgmath.h are already provided by those headers -#include // (since C++11)(deprecated in C++17) defines one compatibility macro constant -#include // (since C++11)(deprecated in C++17) defines one compatibility macro constant -#include // (since C++11) std::thread class and supporting functions -#include // (since C++11) mutual exclusion primitives -#include // (since C++11) primitives for asynchronous computations -#include // (since C++11) thread waiting conditions -#endif -#if __cplusplus >= 201300L -#include // (since C++14) shared mutual exclusion primitives -#endif -#if __cplusplus >= 201500L -#include // (since C++17) std::any class template -#include // (since C++17) std::optional class template -#include // (since C++17) std::variant class template -#include // (since C++17) Polymorphic allocators and memory resources -#include // (since C++17) std::basic_string_view class template -#include // (since C++17) Predefined execution policies for parallel versions of the algorithms -#include // (since C++17) std::path class and supporting functions -#endif diff --git a/trial4/nbproject/private/launcher.properties b/trial4/nbproject/private/launcher.properties deleted file mode 100644 index 3edc2d8..0000000 --- a/trial4/nbproject/private/launcher.properties +++ /dev/null @@ -1,42 +0,0 @@ -# Launchers File syntax: -# -# [Must-have property line] -# launcher1.runCommand= -# [Optional extra properties] -# launcher1.displayName= -# launcher1.hide= -# launcher1.buildCommand= -# launcher1.runDir= -# launcher1.runInOwnTab= -# launcher1.symbolFiles= -# launcher1.env.= -# (If this value is quoted with ` it is handled as a native command which execution result will become the value) -# [Common launcher properties] -# common.runDir= -# (This value is overwritten by a launcher specific runDir value if the latter exists) -# common.env.= -# (Environment variables from common launcher are merged with launcher specific variables) -# common.symbolFiles= -# (This value is overwritten by a launcher specific symbolFiles value if the latter exists) -# -# In runDir, symbolFiles and env fields you can use these macroses: -# ${PROJECT_DIR} - project directory absolute path -# ${OUTPUT_PATH} - linker output path (relative to project directory path) -# ${OUTPUT_BASENAME}- linker output filename -# ${TESTDIR} - test files directory (relative to project directory path) -# ${OBJECTDIR} - object files directory (relative to project directory path) -# ${CND_DISTDIR} - distribution directory (relative to project directory path) -# ${CND_BUILDDIR} - build directory (relative to project directory path) -# ${CND_PLATFORM} - platform name -# ${CND_CONF} - configuration name -# ${CND_DLIB_EXT} - dynamic library extension -# -# All the project launchers must be listed in the file! -# -# launcher1.runCommand=... -# launcher2.runCommand=... -# ... -# common.runDir=... -# common.env.KEY=VALUE - -# launcher1.runCommand= \ No newline at end of file diff --git a/trial4/nbproject/private/private.xml b/trial4/nbproject/private/private.xml deleted file mode 100644 index 89b112f..0000000 --- a/trial4/nbproject/private/private.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - true - - - 0 - 0 - - - - - file:/home/atul/Projects/GIT/RIoT/openSSL-DICE/trial3/layer2.c - file:/home/atul/Projects/GIT/RIoT/openSSL-DICE/trial3/layer1.c - file:/home/atul/Projects/GIT/RIoT/openSSL-DICE/trial3/nbproject/private/launcher.properties - file:/home/atul/Projects/GIT/RIoT/openSSL-DICE/trial3/makefile - file:/home/atul/Projects/GIT/RIoT/openSSL-DICE/trial3/main.c - - - diff --git a/trial4/nbproject/project.xml b/trial4/nbproject/project.xml deleted file mode 100644 index d443805..0000000 --- a/trial4/nbproject/project.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - org.netbeans.modules.cnd.makeproject - - - trial3 - c - - h - UTF-8 - - - . - - - - Default - 0 - - - - false - - - - diff --git a/trial4/out/main b/trial4/out/main deleted file mode 100755 index aa8be774c739b262ab46210d3c25df2a57cd055b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22920 zcmeHPdw5jUwLf`bLonZ?SQ# z({wEQspZmo<<@?FT6?|GiUt&jAZO6p7GHphZ9u^p9vZc3)Rx@e+Gp=GdnR+J?d|=( z`v*H;W}WrhYpuQZ+K+Sgo-_LgTE(2)oE$}@JmpG-ai^MygJ#Ke4eYE zqYMF@kADZx&ZPa^w4jAtE)SISrstYKCOwDC2`W4!TEO$Nk?s-`6;x4F29O^4TKOHu zf~xF7&>nIKX*;JvkK7}@C0uU_*ArCX{tGJVM|GqB8lIm?%aBJ&P?Duoxj*Ek>nWEq zb`V`*!iu0m?;7ZlpWieUbHOTJo?TqJcsv9Z?J%*qsczboiOt>#%}uT0_6hCNr%jkP zrKHVYGMUwz?33)=`L(PhG9yAoK2!H1jPi4L|HqNHOBUa@>#86B=$Y%kyz`+6HCI#K zWc-VEyQ@ddQSu!p5;g_@)9^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