Searched refs:seckey (Results 1 - 15 of 15) sorted by relevance

/netbsd-current/crypto/external/bsd/netpgp/dist/src/lib/
H A Dssh2pgp.c277 pubkey = &key->key.seckey.pubkey;
343 /* convert an ssh (host) seckey to a pgp seckey */
361 /*pgp_print_keydata(io, key, "sec", &key->key.seckey.pubkey, 0);*/
365 (void) memcpy(&key->key.seckey.pubkey, pubkey, sizeof(*pubkey));
366 key->key.seckey.s2k_usage = PGP_S2KU_ENCRYPTED_AND_HASHED;
367 key->key.seckey.alg = PGP_SA_CAST5;
368 key->key.seckey.s2k_specifier = PGP_S2KS_SALTED;
369 key->key.seckey.hash_alg = PGP_HASH_SHA1;
370 if (key->key.seckey
438 pgp_key_t *seckey; local
[all...]
H A Dopenssl_crypto.c119 makeRSA(const pgp_rsa_pubkey_t *pubkey, const pgp_rsa_seckey_t *seckey) argument
128 if (seckey) {
129 d = BN_dup(seckey->d);
130 p = BN_dup(seckey->p);
131 q = BN_dup(seckey->q);
311 (void) fprintf(stderr,"makeECDSA: failed to set seckey for key\n");
325 test_seckey(const pgp_seckey_t *seckey) argument
327 RSA *test = makeRSA(&seckey->pubkey.key.rsa, &seckey->key.rsa);
749 \param seckey RS
754 pgp_rsa_private_encrypt(uint8_t *out, const uint8_t *in, size_t length, const pgp_rsa_seckey_t *seckey, const pgp_rsa_pubkey_t *pubkey) argument
791 pgp_rsa_private_decrypt(uint8_t *out, const uint8_t *in, size_t length, const pgp_rsa_seckey_t *seckey, const pgp_rsa_pubkey_t *pubkey) argument
903 pgp_seckey_t *seckey; local
1206 pgp_elgamal_private_decrypt(uint8_t *out, const uint8_t *g_to_k, const uint8_t *in, size_t length, const pgp_elgamal_seckey_t *seckey, const pgp_elgamal_pubkey_t *pubkey) argument
[all...]
H A Dsignature.c791 * \param seckey
800 const pgp_seckey_t *seckey)
806 switch (seckey->pubkey.alg) {
810 if (seckey->key.rsa.d == NULL) {
817 if (seckey->key.dsa.x == NULL) {
824 if (seckey->key.ecdsa.x == NULL) {
833 seckey->pubkey.alg);
863 switch (seckey->pubkey.alg) {
867 if (!rsa_sign(&sig->hash, &key->key.rsa, &seckey->key.rsa,
876 if (!dsa_sign(&sig->hash, &key->key.dsa, &seckey
797 pgp_write_sig(pgp_output_t *output, pgp_create_sig_t *sig, const pgp_pubkey_t *key, const pgp_seckey_t *seckey) argument
1019 pgp_sign_file(pgp_io_t *io, const char *inname, const char *outname, const pgp_seckey_t *seckey, const char *hashname, const int64_t from, const uint64_t duration, const unsigned armored, const unsigned cleartext, const unsigned overwrite) argument
[all...]
H A Dpacket-parse.c1121 pgp_seckey_free(&c->u.seckey);
2420 if (!parse_pubkey_data(&pkt.u.seckey.pubkey, region, stream)) {
2425 pgp_print_pubkey(&pkt.u.seckey.pubkey);
2427 stream->reading_v3_secret = (pkt.u.seckey.pubkey.version != PGP_V4);
2432 pkt.u.seckey.s2k_usage = (pgp_s2k_usage_t)c;
2434 if (pkt.u.seckey.s2k_usage == PGP_S2KU_ENCRYPTED ||
2435 pkt.u.seckey.s2k_usage == PGP_S2KU_ENCRYPTED_AND_HASHED) {
2439 pkt.u.seckey.alg = (pgp_symm_alg_t)c;
2443 pkt.u.seckey.s2k_specifier = (pgp_s2k_specifier_t)c;
2444 switch (pkt.u.seckey
2482 pgp_packet_t seckey; local
[all...]
H A Dvalidate.h62 pgp_seckey_t seckey; member in struct:__anon358
H A Dkeyring.c142 pgp_seckey_free(&keydata->key.seckey);
164 &keydata->key.seckey.pubkey;
194 &data->key.seckey : NULL;
212 &data->key.seckey : NULL;
226 pgp_seckey_t *seckey; member in struct:__anon1
276 if ((decrypt->seckey = calloc(1, sizeof(*decrypt->seckey))) == NULL) {
280 decrypt->seckey->checkhash = calloc(1, PGP_CHECKHASH_SIZE);
281 *decrypt->seckey = content->seckey;
1205 pgp_add_to_secring(pgp_keyring_t *keyring, const pgp_seckey_t *seckey) argument
[all...]
H A Dcrypto.c82 \param seckey
91 const pgp_seckey_t *seckey)
106 switch (seckey->pubkey.alg) {
114 &seckey->key.rsa, &seckey->pubkey.key.rsa);
154 &seckey->key.elgamal, &seckey->pubkey.key.elgamal);
301 *content->get_seckey.seckey = cbinfo->sshseckey;
516 parse->cbinfo.sshseckey = (sshkeys) ? &secring->keys[0].key.seckey : NULL;
588 parse->cbinfo.sshseckey = (sshkeys) ? &secring->keys[0].key.seckey
87 pgp_decrypt_decode_mpi(uint8_t *buf, unsigned buflen, const BIGNUM *g_to_k, const BIGNUM *encmpi, const pgp_seckey_t *seckey) argument
[all...]
H A Dnetpgp.c885 if (netpgp_getvar(netpgp, "need seckey")) {
913 if (!readsshkeys(netpgp, homedir, netpgp_getvar(netpgp, "need seckey"))) {
1270 pgp_sprint_keydata(netpgp->io, NULL, key, &cp, "signature ", &key->key.seckey.pubkey, 0);
1306 (void) fprintf(io->errs, "Cannot write seckey\n");
1401 pgp_seckey_t *seckey; local
1426 for (i = 0, seckey = NULL ; !seckey && (i < attempts || attempts == INFINITE_ATTEMPTS) ; i++) {
1434 &keypair->key.seckey.pubkey, 0);
1442 seckey = pgp_decrypt_seckey(keypair, netpgp->passfp);
1443 if (seckey
1530 pgp_seckey_t *seckey; local
[all...]
H A Dpacket-print.c737 \param seckey
741 const pgp_seckey_t *seckey)
748 printf("S2K Usage: %d\n", seckey->s2k_usage);
749 if (seckey->s2k_usage != PGP_S2KU_NONE) {
750 printf("S2K Specifier: %d\n", seckey->s2k_specifier);
751 printf("Symmetric algorithm: %d (%s)\n", seckey->alg,
752 pgp_show_symm_alg(seckey->alg));
753 printf("Hash algorithm: %d (%s)\n", seckey->hash_alg,
754 pgp_show_hash_alg((uint8_t)seckey->hash_alg));
755 if (seckey
740 print_seckey_verbose(const pgp_content_enum type, const pgp_seckey_t *seckey) argument
[all...]
H A Dpacket.h832 const pgp_seckey_t *seckey; member in struct:__anon45
840 const pgp_seckey_t **seckey; member in struct:__anon46
883 pgp_seckey_t seckey; member in union:__anon47
957 pgp_seckey_t seckey; member in union:__anon49
989 pgp_keydata_key_t key; /* pubkey/seckey data */
H A Dcreate.c576 if (!pgp_write_struct_seckey(&key->key.seckey, passphrase,
1285 \param seckey Secret Key to use
1293 const pgp_seckey_t *seckey,
1299 pgp_keyid(keyid, PGP_KEY_ID_SIZE, &seckey->pubkey, PGP_HASH_SHA1); /* XXX - hardcoded */
1305 pgp_write_scalar(output, (unsigned)seckey->pubkey.alg, 1) &&
1292 pgp_write_one_pass_sig(pgp_output_t *output, const pgp_seckey_t *seckey, const pgp_hash_alg_t hash_alg, const pgp_sig_type_t sig_type) argument
H A Dvalidate.c272 key->seckey = content->seckey;
273 key->pubkey = key->seckey.pubkey;
H A Dwriter.c1347 \param seckey
1350 pgp_push_checksum_writer(pgp_output_t *output, pgp_seckey_t *seckey) argument
1364 if ((sum->hashed = seckey->checkhash) == NULL) {
1365 sum->hashed = seckey->checkhash = calloc(1, hashsize);
H A Dmisc.c140 pgp_add_to_secring(keyring, &content->seckey);
H A Dreader.c2208 * sets the seckey in the content struct
2266 *content->get_seckey.seckey = secret;

Completed in 310 milliseconds