+++ /dev/null
-# Test vectors for MP functions
-#
-# $Id: mp,v 1.2 1999/11/22 20:51:09 mdw Exp $
-
-add {
- 5 4 9; 5 -4 1; -5 4 -1; -5 -4 -9;
- 0xffffffff 1 0x100000000;
-}
-
-sub {
- 5 4 1; 5 -4 9; -5 4 -9; -5 -4 -1;
- 4 5 -1; 4 -5 9; -4 5 -9; -4 -5 1;
-}
-
-mul {
- 5 4 20; -5 4 -20; 5 -4 -20; -5 -4 20;
- 0x10000 0x10000 0x100000000;
-}
-
-div {
- 9 4 2 1; -9 4 -3 3; 9 -4 -3 -3; -9 -4 2 -1;
-}
-
-gcd {
- 16 12 4 -2 3;
- 12 16 4 -1 1;
- 693 609 21 -181 206;
- 4398082908043 90980984098081324 1 -32483863573352089 1570292150447;
-
- 829561629303257626084392170900075 32498098450983560651904114638965
- 5 -22841190347053190672253237276815 583054885752979049202923618992482;
-
- 5509672937670943767152343650729669537671508
- 398326674296699796695672966992514673531
- 17
- -191606556147997561067126486929677861359
- 2650310725368604614586643627755316700713319;
-
- 324098408098290809832490802984098208098324
- 23430980840982340982098409823089098443
- 1
- -4158709420138833210339208344965073815
- 57523460582278135926717203882531035926727;
-
- # --- RSA test ---
- #
- # The first number is (p - 1)(q - 1) from `mpmont'. The second is a
- # random number (it's actually prime, but that doesn't matter) which I
- # can use as an RSA encryption exponent. The last is the partner
- # decryption exponent, produced using the extended GCD algorithm.
-
- 665251164384574309450646977867043764321191240895546832784045453360
- 5945908509680983480596809586040589085680968709809890671
- 1
- -4601007896041464028712478963832994007038251361995647370
- 514778499400157641662814932021958856708417966520837469125919104431;
-}
-
-jacobi {
- 4 5 1;
- 6 7 -1;
- 15 27 0;
- 2132498039840981 98729378979237498798347932749951 1;
-}