File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 183183#define CPACF_KLMD_DUFOP 0x4000
184184#define CPACF_KLMD_NIP 0x8000
185185
186+ /*
187+ * Function codes for KDSA (COMPUTE DIGITAL SIGNATURE AUTHENTICATION)
188+ * instruction
189+ */
190+ #define CPACF_KDSA_QUERY 0x00
191+ #define CPACF_KDSA_ECDSA_VERIFY_P256 0x01
192+ #define CPACF_KDSA_ECDSA_VERIFY_P384 0x02
193+ #define CPACF_KDSA_ECDSA_VERIFY_P521 0x03
194+ #define CPACF_KDSA_ECDSA_SIGN_P256 0x09
195+ #define CPACF_KDSA_ECDSA_SIGN_P384 0x0a
196+ #define CPACF_KDSA_ECDSA_SIGN_P521 0x0b
197+ #define CPACF_KDSA_ENC_ECDSA_SIGN_P256 0x11
198+ #define CPACF_KDSA_ENC_ECDSA_SIGN_P384 0x12
199+ #define CPACF_KDSA_ENC_ECDSA_SIGN_P521 0x13
200+ #define CPACF_KDSA_EDDSA_VERIFY_ED25519 0x20
201+ #define CPACF_KDSA_EDDSA_VERIFY_ED448 0x24
202+ #define CPACF_KDSA_EDDSA_SIGN_ED25519 0x28
203+ #define CPACF_KDSA_EDDSA_SIGN_ED448 0x2c
204+ #define CPACF_KDSA_ENC_EDDSA_SIGN_ED25519 0x30
205+ #define CPACF_KDSA_ENC_EDDSA_SIGN_ED448 0x34
206+
186207typedef struct { unsigned char bytes [16 ]; } cpacf_mask_t ;
187208
188209/*
@@ -287,6 +308,8 @@ static __always_inline int __cpacf_check_opcode(unsigned int opcode)
287308 return test_facility (57 ); /* check for MSA5 */
288309 case CPACF_KMA :
289310 return test_facility (146 ); /* check for MSA8 */
311+ case CPACF_KDSA :
312+ return test_facility (155 ); /* check for MSA9 */
290313 default :
291314 __cpacf_bad_opcode ();
292315 return 0 ;
You can’t perform that action at this time.
0 commit comments