Changeset View
Changeset View
Standalone View
Standalone View
g10/seskey.c
Context not available. | |||||
byte *frame; | byte *frame; | ||||
int i,n; | int i,n; | ||||
u16 csum; | u16 csum; | ||||
gcry_mpi_t a; | |||||
if (DBG_CRYPTO) | if (DBG_CRYPTO) | ||||
log_debug ("encode_session_key: encoding %d byte DEK", dek->keylen); | log_debug ("encode_session_key: encoding %d byte DEK", dek->keylen); | ||||
Context not available. | |||||
(int) nframe, frame[0], frame[1], frame[2], | (int) nframe, frame[0], frame[1], frame[2], | ||||
frame[nframe-3], frame[nframe-2], frame[nframe-1]); | frame[nframe-3], frame[nframe-2], frame[nframe-1]); | ||||
if (gcry_mpi_scan (&a, GCRYMPI_FMT_USG, frame, nframe, &nframe)) | return gcry_mpi_set_opaque (NULL, frame, 8*nframe); | ||||
BUG(); | |||||
xfree(frame); | |||||
return a; | |||||
} | } | ||||
/* The current limitation is that we can only use a session key | /* The current limitation is that we can only use a session key | ||||
Context not available. | |||||
frame[n++] = csum >>8; | frame[n++] = csum >>8; | ||||
frame[n++] = csum; | frame[n++] = csum; | ||||
log_assert (n == nframe); | log_assert (n == nframe); | ||||
if (gcry_mpi_scan( &a, GCRYMPI_FMT_USG, frame, n, &nframe)) | return gcry_mpi_set_opaque (NULL, frame, 8*n); | ||||
BUG(); | |||||
xfree (frame); | |||||
return a; | |||||
} | } | ||||
Context not available. |