Undo previous commit, which was an accident.
[oweals/openssl.git] / crypto / bn / bn_mont2.h
index 1bce6d71f1d27910b8df66001d08fd85f08a1b52..59f2657b9fc32fc71b378e05d025ebead663f7d5 100644 (file)
@@ -1,41 +1,36 @@
-/*\r
- *\r
- *     bn_mont2.h\r
- *\r
- *     Montgomery Modular Arithmetic Functions.\r
- *\r
- *     Copyright (C) Lenka Fibikova 2000\r
- *\r
- *\r
- */\r
-\r
-#ifndef HEADER_MONT2_H\r
-#define HEADER_MONT2_H\r
-\r
-#define MONTGOMERY\r
-\r
-#include "bn.h"\r
-\r
-typedef struct bn_mont_st{\r
-       int R_num_bits;\r
-       int p_num_bytes;\r
-       BIGNUM *p;\r
-       BN_ULONG p_inv_b_neg;   /* p' = p^{-1} mod b; b = 2^BN_BITS */\r
-} BN_MONTGOMERY;\r
-\r
-#define BN_from_mont(x, mont, ctx) (BN_mont_red((x), (mont), (ctx)))\r
-\r
-\r
-BN_MONTGOMERY *BN_mont_new();\r
-int BN_to_mont(BIGNUM *x, BN_MONTGOMERY *mont, BN_CTX *ctx); \r
-void BN_mont_clear_free(BN_MONTGOMERY *mont);\r
-int BN_mont_set(BIGNUM *p, BN_MONTGOMERY *mont, BN_CTX *ctx);\r
-int BN_mont_red(BIGNUM *y, BN_MONTGOMERY *mont, BN_CTX *ctx);\r
-BN_ULONG BN_mont_inv(BIGNUM *x, int e, BN_CTX *ctx);\r
-int BN_mont_mod_mul(BIGNUM *r, BIGNUM *x, BIGNUM *y, BN_MONTGOMERY *mont, BN_CTX *ctx);\r
-int BN_mont_mod_add(BIGNUM *r, BIGNUM *x, BIGNUM *y, BN_MONTGOMERY *mont);\r
-int BN_mont_mod_sub(BIGNUM *r, BIGNUM *x, BIGNUM *y, BN_MONTGOMERY *mont);\r
-int BN_mont_mod_lshift1(BIGNUM *r, BIGNUM *x, BN_MONTGOMERY *mont);\r
-int BN_mont_mod_lshift(BIGNUM *r, BIGNUM *x, int n, BN_MONTGOMERY *mont);\r
-\r
-#endif
\ No newline at end of file
+/*
+ *
+ *     bn_mont2.h
+ *
+ *     Montgomery Modular Arithmetic Functions.
+ *
+ *     Copyright (C) Lenka Fibikova 2000
+ *
+ *
+ */
+
+#ifndef HEADER_MONT2_H
+#define HEADER_MONT2_H
+
+#define MONTGOMERY
+
+#include <openssl/bn.h>
+
+typedef struct bn_mont_st{
+       int R_num_bits;
+       int p_num_bytes;
+       BIGNUM *p;
+       BN_ULONG p_inv_b_neg;   /* p' = p^{-1} mod b; b = 2^BN_BITS */
+} BN_MONTGOMERY;
+
+#define BN_from_mont(x, mont, ctx) (BN_mont_red((x), (mont), (ctx)))
+
+
+BN_MONTGOMERY *BN_mont_new();
+int BN_to_mont(BIGNUM *x, BN_MONTGOMERY *mont, BN_CTX *ctx); 
+void BN_mont_clear_free(BN_MONTGOMERY *mont);
+int BN_mont_set(BIGNUM *p, BN_MONTGOMERY *mont, BN_CTX *ctx);
+int BN_mont_red(BIGNUM *y, BN_MONTGOMERY *mont, BN_CTX *ctx);
+BN_ULONG BN_mont_inv(BIGNUM *x, int e, BN_CTX *ctx);
+
+#endif