2012-07-31 12:57:00 +00:00
|
|
|
/*
|
|
|
|
* sc-hsm.h
|
|
|
|
*
|
|
|
|
* Copyright (C) 2012 Andreas Schwier, CardContact, Minden, Germany
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SC_HSM_H_
|
|
|
|
#define SC_HSM_H_
|
|
|
|
|
|
|
|
#define MAX_EXT_APDU_LENGTH 1014
|
|
|
|
|
2012-08-07 14:00:42 +00:00
|
|
|
#define KEY_PREFIX 0xCC /* Hi byte in file identifier for key objects */
|
|
|
|
#define PRKD_PREFIX 0xC4 /* Hi byte in file identifier for PRKD objects */
|
2012-07-31 12:57:00 +00:00
|
|
|
#define EE_CERTIFICATE_PREFIX 0xCE /* Hi byte in file identifier for EE certificates */
|
|
|
|
|
2012-08-07 14:00:42 +00:00
|
|
|
#define ALGO_RSA_RAW 0x20 /* RSA signature with external padding */
|
|
|
|
#define ALGO_RSA_PKCS1 0x30 /* RSA signature with DigestInfo input and PKCS#1 V1.5 padding */
|
|
|
|
#define ALGO_RSA_PKCS1_SHA1 0x31 /* RSA signature with SHA-1 hash and PKCS#1 V1.5 padding */
|
2012-07-31 12:57:00 +00:00
|
|
|
#define ALGO_RSA_PKCS1_SHA256 0x33 /* RSA signature with SHA-256 hash and PKCS#1 V1.5 padding */
|
|
|
|
|
2012-08-07 14:00:42 +00:00
|
|
|
#define ALGO_RSA_PSS_SHA1 0x41 /* RSA signature with SHA-1 hash and PKCS#1 PSS padding */
|
|
|
|
#define ALGO_RSA_PSS_SHA256 0x43 /* RSA signature with SHA-256 hash and PKCS#1 PSS padding */
|
2012-07-31 12:57:00 +00:00
|
|
|
|
2012-08-07 14:00:42 +00:00
|
|
|
#define ALGO_EC_RAW 0x70 /* ECDSA signature with hash input */
|
|
|
|
#define ALGO_EC_SHA1 0x71 /* ECDSA signature with SHA-1 hash */
|
|
|
|
#define ALGO_EC_SHA224 0x72 /* ECDSA signature with SHA-224 hash */
|
|
|
|
#define ALGO_EC_SHA256 0x73 /* ECDSA signature with SHA-256 hash */
|
2012-07-31 12:57:00 +00:00
|
|
|
|
|
|
|
#endif /* SC_HSM_H_ */
|