• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/timemachine/libgcrypt-1.5.0/cipher/

Lines Matching defs:plaintext

100   gcry_mpi_t plaintext = gcry_mpi_new (nbits);
109 /* Create a random plaintext. */
110 gcry_mpi_randomize (plaintext, nbits, GCRY_WEAK_RANDOM);
113 public (ciphertext, plaintext, &pk);
115 /* Check that the cipher text does not match the plaintext. */
116 if (!gcry_mpi_cmp (ciphertext, plaintext))
117 goto leave; /* Ciphertext is identical to the plaintext. */
122 /* Check that the decrypted plaintext matches the original plaintext. */
123 if (gcry_mpi_cmp (decr_plaintext, plaintext))
126 /* Create another random plaintext as data for signature checking. */
127 gcry_mpi_randomize (plaintext, nbits, GCRY_WEAK_RANDOM);
129 /* Use the RSA secret function to create a signature of the plaintext. */
130 secret (signature, plaintext, sk);
134 if (gcry_mpi_cmp (decr_plaintext, plaintext))
140 if (!gcry_mpi_cmp (decr_plaintext, plaintext))
149 gcry_mpi_release (plaintext);
1198 gcry_mpi_t plaintext = NULL;
1206 /* Create plaintext. The plaintext is actually a big integer number. */
1207 plaintext = gcry_mpi_new (nbits);
1208 gcry_mpi_randomize (plaintext, nbits, GCRY_WEAK_RANDOM);
1210 /* Put the plaintext into an S-expression. */
1212 "(data (flags raw) (value %m))", plaintext);
1236 /* Check that the ciphertext does no match the plaintext. */
1237 /* _gcry_log_mpidump ("plaintext", plaintext); */
1239 if (!gcry_mpi_cmp (plaintext, ciphertext))
1241 errtxt = "ciphertext matches plaintext";
1266 errtxt = "decrypt returned no plaintext";
1270 /* Check that the decrypted plaintext matches the original plaintext. */
1271 if (gcry_mpi_cmp (plaintext, decr_plaintext))
1284 gcry_mpi_release (plaintext);