Commit 0cffb776 authored by garciay's avatar garciay
Browse files

Add Brainpool Security support

parent 36aa1e2e
Loading
Loading
Loading
Loading
+375 −106

File changed.

Preview size limit exceeded, changes collapsed.

+38 −18
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ module TestCodec_SecuredFuntions {
      } else {
        setverdict(pass);
      }
    } // End of test tc_sha256_1
    } // End of testcase tc_sha256_1

    testcase tc_sha384_1() runs on TCType system TCType {
      var octetstring v_test := '616263'O;
@@ -57,7 +57,7 @@ module TestCodec_SecuredFuntions {
      } else {
        setverdict(pass);
      }
    } // End of test tc_sha384_1
    } // End of testcase tc_sha384_1

    testcase tc_f_generate_key_pair_1() runs on TCType system TCType {
      var Oct32 v_private_key;
@@ -73,7 +73,7 @@ module TestCodec_SecuredFuntions {
      log("v_public_key Y= ", v_publicKeyY);
      
      setverdict(pass);
    } // End of test tc_f_generate_key_pair_1
    } // End of testcase tc_f_generate_key_pair_1

    testcase tc_f_generate_key_pair_2() runs on TCType system TCType {
      var Oct32 v_private_key;
@@ -89,7 +89,7 @@ module TestCodec_SecuredFuntions {
      log("v_public_key Y= ", v_publicKeyY);
      
      setverdict(pass);
    } // End of test tc_f_generate_key_pair_2
    } // End of testcase tc_f_generate_key_pair_2

    testcase tc_f_generate_key_pair_3() runs on TCType system TCType {
      var Oct48 v_private_key;
@@ -105,7 +105,7 @@ module TestCodec_SecuredFuntions {
      log("v_public_key Y= ", v_publicKeyY);
      
      setverdict(pass);
    } // End of test tc_f_generate_key_pair_3
    } // End of testcase tc_f_generate_key_pair_3

    testcase tc_f_signWithEcdsaNistp256WithSha256_1() runs on TCType system TCType {
      var Oct32 v_private_key;
@@ -129,7 +129,7 @@ module TestCodec_SecuredFuntions {
      }
      
      setverdict(pass);
    } // End of test tc_f_signWithEcdsaNistp256WithSha256_1
    } // End of testcase tc_f_signWithEcdsaNistp256WithSha256_1

    testcase tc_f_verifyWithEcdsaNistp256WithSha256_1() runs on TCType system TCType {
      var Oct32 v_private_key;
@@ -158,7 +158,7 @@ module TestCodec_SecuredFuntions {
      } else {
        setverdict(pass);
      }
    } // End of test tc_f_verifyWithEcdsaNistp256WithSha256_1
    } // End of testcase tc_f_verifyWithEcdsaNistp256WithSha256_1

    testcase tc_f_verifyWithEcdsaNistp256WithSha256_2() runs on TCType system TCType {
      var Oct32 v_private_key;
@@ -203,7 +203,7 @@ module TestCodec_SecuredFuntions {
      } else {
        setverdict(pass);
      }
    } // End of test tc_f_verifyWithEcdsaNistp256WithSha256_2
    } // End of testcase tc_f_verifyWithEcdsaNistp256WithSha256_2

    testcase tc_f_verifyWithEcdsaNistp256WithSha256_3() runs on TCType system TCType {
      var Oct32 v_private_key;
@@ -256,7 +256,7 @@ module TestCodec_SecuredFuntions {
      }
      
      setverdict(pass);
    } // End of test tc_f_verifyWithEcdsaNistp256WithSha256_3
    } // End of testcase tc_f_verifyWithEcdsaNistp256WithSha256_3

    testcase tc_f_signWithEcdsaBrainpoolp256WithSha256_1() runs on TCType system TCType {
      var Oct32 v_private_key;
@@ -280,7 +280,7 @@ module TestCodec_SecuredFuntions {
      }
      
      setverdict(pass);
    } // End of test tc_f_signWithEcdsaBrainpoolp256WithSha256_1
    } // End of testcase tc_f_signWithEcdsaBrainpoolp256WithSha256_1

    testcase tc_f_signWithEcdsaBrainpoolp384WithSha384_1() runs on TCType system TCType {
      var Oct48 v_private_key;
@@ -304,7 +304,7 @@ module TestCodec_SecuredFuntions {
      }
      
      setverdict(pass);
    } // End of test tc_f_signWithEcdsaBrainpoolp384WithSha384_1
    } // End of testcase tc_f_signWithEcdsaBrainpoolp384WithSha384_1

    testcase tc_f_verifyWithEcdsaBrainpoolp256WithSha256_1() runs on TCType system TCType {
      var Oct32 v_private_key;
@@ -333,7 +333,7 @@ module TestCodec_SecuredFuntions {
      } else {
        setverdict(pass);
      }
    } // End of test tc_f_verifyWithEcdsaBrainpoolp256WithSha256_1
    } // End of testcase tc_f_verifyWithEcdsaBrainpoolp256WithSha256_1

    testcase tc_f_verifyWithEcdsaBrainpoolp256WithSha256_2() runs on TCType system TCType {
      var Oct32 v_private_key;
@@ -378,7 +378,7 @@ module TestCodec_SecuredFuntions {
      } else {
        setverdict(pass);
      }
    } // End of test tc_f_verifyWithEcdsaBrainpoolp256WithSha256_2
    } // End of testcase tc_f_verifyWithEcdsaBrainpoolp256WithSha256_2

    testcase tc_f_verifyWithEcdsaBrainpoolp256WithSha256_3() runs on TCType system TCType {
      var Oct32 v_private_key;
@@ -431,7 +431,7 @@ module TestCodec_SecuredFuntions {
      }
      
      setverdict(pass);
    } // End of test tc_f_verifyWithEcdsaBrainpoolp256WithSha256_3
    } // End of testcase tc_f_verifyWithEcdsaBrainpoolp256WithSha256_3

    testcase tc_f_verifyWithEcdsaBrainpoolp384WithSha384_1() runs on TCType system TCType {
      var Oct48 v_private_key;
@@ -460,7 +460,7 @@ module TestCodec_SecuredFuntions {
      } else {
        setverdict(pass);
      }
    } // End of test tc_f_verifyWithEcdsaBrainpoolp384WithSha384_1
    } // End of testcase tc_f_verifyWithEcdsaBrainpoolp384WithSha384_1

    testcase tc_f_verifyWithEcdsaBrainpoolp384WithSha384_2() runs on TCType system TCType {
      var Oct48 v_private_key;
@@ -505,7 +505,7 @@ module TestCodec_SecuredFuntions {
      } else {
        setverdict(pass);
      }
    } // End of test tc_f_verifyWithEcdsaBrainpoolp384WithSha384_2
    } // End of testcase tc_f_verifyWithEcdsaBrainpoolp384WithSha384_2

    testcase tc_f_verifyWithEcdsaBrainpoolp384WithSha384_3() runs on TCType system TCType {
      var Oct48 v_private_key;
@@ -558,6 +558,26 @@ module TestCodec_SecuredFuntions {
      }
      
      setverdict(pass);
    } // End of test tc_f_verifyWithEcdsaBrainpoolp384WithSha384_3
    } // End of testcase tc_f_verifyWithEcdsaBrainpoolp384WithSha384_3
    
    control {
        execute(tc_sha256_1());
        execute(tc_sha384_1());
        execute(tc_f_generate_key_pair_1());
        execute(tc_f_generate_key_pair_2());
        execute(tc_f_generate_key_pair_3());
        execute(tc_f_signWithEcdsaNistp256WithSha256_1());
        execute(tc_f_verifyWithEcdsaNistp256WithSha256_1());
        execute(tc_f_verifyWithEcdsaNistp256WithSha256_2());
        execute(tc_f_verifyWithEcdsaNistp256WithSha256_3());
        execute(tc_f_signWithEcdsaBrainpoolp256WithSha256_1());
        execute(tc_f_signWithEcdsaBrainpoolp384WithSha384_1());
        execute(tc_f_verifyWithEcdsaBrainpoolp256WithSha256_1());
        execute(tc_f_verifyWithEcdsaBrainpoolp256WithSha256_2());
        execute(tc_f_verifyWithEcdsaBrainpoolp256WithSha256_3());
        execute(tc_f_verifyWithEcdsaBrainpoolp384WithSha384_1());
        execute(tc_f_verifyWithEcdsaBrainpoolp384WithSha384_2());
        execute(tc_f_verifyWithEcdsaBrainpoolp384WithSha384_3());
    }
    
} // End of module TestCodec_SecuredFuntions 
+13 −6
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ module TestCodec_SecuredMessages {
                setverdict(pass);
            }
        }
    }
    } // End of testcase tc_ssp_cam
    
    testcase tc_ssp_denm() runs on TCType system TCType {
        var SspDENM v_sspDENM := valueof(m_sspDENMContainer_sign_all);
@@ -64,7 +64,7 @@ module TestCodec_SecuredMessages {
                setverdict(pass);
            }
        }
    }
    } // End of testcase tc_ssp_denm
    
    testcase tc_secured_message_unsecured() runs on TCType system TCType {
        var template (value) EtsiTs103097Data v_secured_data;
@@ -76,9 +76,9 @@ module TestCodec_SecuredMessages {
        v_encMsg := encvalue(v_secured_data);
      
        setverdict(pass, "Encoding passed.");
    }
    } // End of testcase tc_secured_message_unsecured
    
    testcase tc_secured_message_signed() runs on TCType system TCType {
    testcase tc_secured_message_signed_1() runs on TCType system TCType {
        var template (value) EtsiTs103097Data v_secured_data;
        var octetstring v_raw_payload_to_be_signed := 'CAFFEDECA0000001'O;
        var HashedId8 v_digest := '0000000000000000'O;
@@ -111,6 +111,13 @@ module TestCodec_SecuredMessages {
        v_encMsg := encvalue(v_secured_data);
      
        setverdict(pass, "Encoding passed.");
    } // End of testcase tc_secured_message_signed_1
    
    control {
        execute(tc_ssp_cam());
        execute(tc_ssp_denm());
        execute(tc_secured_message_unsecured());
        execute(tc_secured_message_signed_1());
    }
    
} // End of module TestCodec_SecuredMessages
 No newline at end of file