Lines Matching defs:skck
55 struct skck {
69 * Storage for encrypted skck structure here. The length will be
70 * 8 * ( ( ( sizeof(struct skck) - 1 + secret.length ) - 1 ) / 8 + 1 )
74 /* Length of skck structure for given key length (in bits) */
75 #define SKCK_LEN(keylen) ALIGN8(sizeof (struct skck) + KEYLEN(keylen))
863 struct skck *skck;
873 if (common.deskeyarray_len > sizeof (skck->common)/sizeof (des_block) ||
893 skck = MOVE_ADDR(&(cd->public), DHKEYSIZE(pk));
895 skck->common[i] = common.deskeyarray_val[i];
897 skck->verifier = key;
898 memcpy(&(skck->secret), sk, DHKEYSIZE(sk));
902 err = cbc_crypt(key.c, (char *)skck, SKCK_LEN(newch->keylen),
927 struct skck *skck, *skck_cd;
936 /* Allocate skck structure for decryption */
937 if ((skck = malloc(SKCK_LEN(ch->keylen))) == 0) {
944 memcpy(skck, skck_cd, SKCK_LEN(ch->keylen));
946 err = cbc_crypt(key.c, (char *)skck, SKCK_LEN(ch->keylen),
950 free(skck);
953 if (memcmp(key.c, skck->verifier.c, sizeof (skck->verifier.c)) != 0) {
955 free(skck);
972 bin2hex(skck->secret.key, (u_char *)cl->secret->keybuf3_val,
973 skck->secret.length);
974 cl->secret->keybuf3_len = skck->secret.length*2+1;
975 cl->deskey.deskeyarray_len = sizeof (skck->common)/sizeof (des_block);
977 cl->deskey.deskeyarray_val[i] = skck->common[i];
983 free(skck);