Home | History | Annotate | Download | only in ecdh

Lines Matching defs:out

60  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
109 static void *KDF1_SHA1(const void *in, size_t inlen, void *out, size_t *outlen)
116 return SHA1(in, inlen, out);
123 static int test_ecdh_curve(int nid, const char *text, BN_CTX *ctx, BIO *out)
146 BIO_puts(out,"Testing key generation with ");
147 BIO_puts(out,text);
149 BIO_puts(out,"\n");
151 (void)BIO_flush(out);
169 BIO_puts(out," pri 1=");
170 BN_print(out,a->priv_key);
171 BIO_puts(out,"\n pub 1=");
172 BN_print(out,x_a);
173 BIO_puts(out,",");
174 BN_print(out,y_a);
175 BIO_puts(out,"\n");
177 BIO_printf(out," .");
178 (void)BIO_flush(out);
197 BIO_puts(out," pri 2=");
198 BN_print(out,b->priv_key);
199 BIO_puts(out,"\n pub 2=");
200 BN_print(out,x_b);
201 BIO_puts(out,",");
202 BN_print(out,y_b);
203 BIO_puts(out,"\n");
205 BIO_printf(out,".");
206 (void)BIO_flush(out);
214 BIO_puts(out," key1 =");
218 BIO_puts(out,buf);
220 BIO_puts(out,"\n");
222 BIO_printf(out,".");
223 (void)BIO_flush(out);
231 BIO_puts(out," key2 =");
235 BIO_puts(out,buf);
237 BIO_puts(out,"\n");
239 BIO_printf(out,".");
240 (void)BIO_flush(out);
246 BIO_printf(out, " failed\n\n");
247 BIO_printf(out, "key a:\n");
248 BIO_printf(out, "private key: ");
249 BN_print(out, EC_KEY_get0_private_key(a));
250 BIO_printf(out, "\n");
251 BIO_printf(out, "public key (x,y): ");
252 BN_print(out, x_a);
253 BIO_printf(out, ",");
254 BN_print(out, y_a);
255 BIO_printf(out, "\nkey b:\n");
256 BIO_printf(out, "private key: ");
257 BN_print(out, EC_KEY_get0_private_key(b));
258 BIO_printf(out, "\n");
259 BIO_printf(out, "public key (x,y): ");
260 BN_print(out, x_b);
261 BIO_printf(out, ",");
262 BN_print(out, y_b);
263 BIO_printf(out, "\n");
264 BIO_printf(out, "generated key a: ");
268 BIO_puts(out, buf);
270 BIO_printf(out, "\n");
271 BIO_printf(out, "generated key b: ");
275 BIO_puts(out,buf);
277 BIO_printf(out, "\n");
285 BIO_printf(out, " ok\n");
307 BIO *out;
319 out=BIO_new(BIO_s_file());
320 if (out == NULL) EXIT(1);
321 BIO_set_fp(out,stdout,BIO_NOCLOSE);
326 if (!test_ecdh_curve(NID_X9_62_prime192v1, "NIST Prime-Curve P-192", ctx, out)) goto err;
327 if (!test_ecdh_curve(NID_secp224r1, "NIST Prime-Curve P-224", ctx, out)) goto err;
328 if (!test_ecdh_curve(NID_X9_62_prime256v1, "NIST Prime-Curve P-256", ctx, out)) goto err;
329 if (!test_ecdh_curve(NID_secp384r1, "NIST Prime-Curve P-384", ctx, out)) goto err;
330 if (!test_ecdh_curve(NID_secp521r1, "NIST Prime-Curve P-521", ctx, out)) goto err;
333 if (!test_ecdh_curve(NID_sect163k1, "NIST Binary-Curve K-163", ctx, out)) goto err;
334 if (!test_ecdh_curve(NID_sect163r2, "NIST Binary-Curve B-163", ctx, out)) goto err;
335 if (!test_ecdh_curve(NID_sect233k1, "NIST Binary-Curve K-233", ctx, out)) goto err;
336 if (!test_ecdh_curve(NID_sect233r1, "NIST Binary-Curve B-233", ctx, out)) goto err;
337 if (!test_ecdh_curve(NID_sect283k1, "NIST Binary-Curve K-283", ctx, out)) goto err;
338 if (!test_ecdh_curve(NID_sect283r1, "NIST Binary-Curve B-283", ctx, out)) goto err;
339 if (!test_ecdh_curve(NID_sect409k1, "NIST Binary-Curve K-409", ctx, out)) goto err;
340 if (!test_ecdh_curve(NID_sect409r1, "NIST Binary-Curve B-409", ctx, out)) goto err;
341 if (!test_ecdh_curve(NID_sect571k1, "NIST Binary-Curve K-571", ctx, out)) goto err;
342 if (!test_ecdh_curve(NID_sect571r1, "NIST Binary-Curve B-571", ctx, out)) goto err;
350 BIO_free(out);