|
globalplatform
|
#include <string.h>#include <stdlib.h>#include <openssl/objects.h>#include "scp.h"#include "crypto.h"#include "util.h"#include "globalplatform/debug.h"#include "globalplatform/errorcodes.h"#include "globalplatform/stringify.h"
Functions | |
| BYTE | map_scp11a_key_usage_qualifier (BYTE securityLevel) |
| BYTE | map_scp11a_security_level (BYTE keyUsageQualifier) |
| BYTE | map_scp11a_scp03_impl (BYTE keyUsageQualifier) |
| DWORD | scp11_private_key_length_from_key_parameter_reference (BYTE keyParameterReference) |
| OPGP_ERROR_STATUS | extract_scp11_sd_public_key_from_certificate_store (PBYTE certificateStore, DWORD certificateStoreLength, PBYTE sdPublicKey, PDWORD sdPublicKeyLength, BYTE *keyParameterReference) |
| OPGP_ERROR_STATUS | parse_scp11_mutual_authentication_response (PBYTE responseData, DWORD responseDataLength, PBYTE sdEphemeralPublicKey, PDWORD sdEphemeralPublicKeyLength, PBYTE receipt, PDWORD receiptLength) |
| OPGP_ERROR_STATUS | scp_parse_initialize_update_response (BYTE secureChannelProtocol, BYTE *secureChannelProtocolImpl, BYTE securityLevel, PBYTE keyInformationData, PBYTE recvBuffer, DWORD recvBufferLength, SCP_INITIALIZE_UPDATE_RESPONSE *response) |
| OPGP_ERROR_STATUS | scp_derive_session_keys_and_verify_card_cryptogram (BYTE secureChannelProtocol, GP211_SECURITY_INFO *secInfo, PBYTE baseKey, PBYTE sEnc, PBYTE sMac, PBYTE dek, DWORD keyLength, PBYTE hostChallenge, const SCP_INITIALIZE_UPDATE_RESPONSE *response) |
| OPGP_ERROR_STATUS | scp_prepare_external_authentication (BYTE secureChannelProtocol, GP211_SECURITY_INFO *secInfo, DWORD keyLength, BYTE securityLevel, PBYTE hostChallenge, const SCP_INITIALIZE_UPDATE_RESPONSE *response, PBYTE hostCryptogram, PBYTE mac) |
| OPGP_ERROR_STATUS | scp11a_generate_ephemeral_keypair (BYTE keyParameterReference, PBYTE privateKey, PDWORD privateKeyLength, PBYTE publicKey, PDWORD publicKeyLength) |
| OPGP_ERROR_STATUS | scp11a_derive_session_keys_and_verify_receipt (GP211_SECURITY_INFO *secInfo, BYTE keyLength, BYTE keyParameterReference, PBYTE oceStaticPrivateKey, DWORD oceStaticPrivateKeyLength, PBYTE sdStaticPublicKey, DWORD sdStaticPublicKeyLength, PBYTE oceEphemeralPrivateKey, DWORD oceEphemeralPrivateKeyLength, PBYTE sdEphemeralPublicKey, DWORD sdEphemeralPublicKeyLength, PBYTE sharedInfo, DWORD sharedInfoLength, PBYTE receiptInput, DWORD receiptInputLength, PBYTE receipt, DWORD receiptLength) |
| OPGP_ERROR_STATUS | scp_wrap_command_by_protocol (GP211_SECURITY_INFO *secInfo, PBYTE apduCommand, PBYTE wrappedApduCommand, SCP_WRAP_COMMAND_CONTEXT *context, PBYTE encryption, PDWORD encryptionLength, PBYTE mac) |
This file contains internal Secure Channel Protocol handling for SCP01/SCP02/SCP03.