Deleted Added
full compact
ecp_nistp256.c (302408) ecp_nistp256.c (325337)
1/* crypto/ec/ecp_nistp256.c */
2/*
3 * Written by Adam Langley (Google) for the OpenSSL project
4 */
5/* Copyright 2011 Google Inc.
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 *

--- 963 unchanged lines hidden (view full) ---

972
973 is_zero |= is_p;
974
975 result = is_zero;
976 result |= ((limb) is_zero) << 64;
977 return result;
978}
979
1/* crypto/ec/ecp_nistp256.c */
2/*
3 * Written by Adam Langley (Google) for the OpenSSL project
4 */
5/* Copyright 2011 Google Inc.
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 *

--- 963 unchanged lines hidden (view full) ---

972
973 is_zero |= is_p;
974
975 result = is_zero;
976 result |= ((limb) is_zero) << 64;
977 return result;
978}
979
980static int smallfelem_is_zero_int(const smallfelem small)
980static int smallfelem_is_zero_int(const void *small)
981{
982 return (int)(smallfelem_is_zero(small) & ((limb) 1));
983}
984
985/*-
986 * felem_inv calculates |out| = |in|^{-1}
987 *
988 * Based on Fermat's Little Theorem:

--- 985 unchanged lines hidden (view full) ---

1974 * Runs in constant time, unless an input is the point at infinity (which
1975 * normally shouldn't happen).
1976 */
1977 ec_GFp_nistp_points_make_affine_internal(num,
1978 points,
1979 sizeof(smallfelem),
1980 tmp_smallfelems,
1981 (void (*)(void *))smallfelem_one,
981{
982 return (int)(smallfelem_is_zero(small) & ((limb) 1));
983}
984
985/*-
986 * felem_inv calculates |out| = |in|^{-1}
987 *
988 * Based on Fermat's Little Theorem:

--- 985 unchanged lines hidden (view full) ---

1974 * Runs in constant time, unless an input is the point at infinity (which
1975 * normally shouldn't happen).
1976 */
1977 ec_GFp_nistp_points_make_affine_internal(num,
1978 points,
1979 sizeof(smallfelem),
1980 tmp_smallfelems,
1981 (void (*)(void *))smallfelem_one,
1982 (int (*)(const void *))
1983 smallfelem_is_zero_int,
1984 (void (*)(void *, const void *))
1985 smallfelem_assign,
1986 (void (*)(void *, const void *))
1987 smallfelem_square_contract,
1988 (void (*)
1989 (void *, const void *,
1990 const void *))

--- 379 unchanged lines hidden ---
1982 smallfelem_is_zero_int,
1983 (void (*)(void *, const void *))
1984 smallfelem_assign,
1985 (void (*)(void *, const void *))
1986 smallfelem_square_contract,
1987 (void (*)
1988 (void *, const void *,
1989 const void *))

--- 379 unchanged lines hidden ---