Lines Matching refs:radix
2068 * Let B represent the radix [e.g. 2**DIGIT_BIT] and
3851 /* reduce "x" in place modulo "n" using the Diminished Radix algorithm.
4051 * Uses Montgomery or Diminished Radix reduction [whichever appropriate]
4341 /* modified diminished radix reduction */
4362 /* reverse an array, used for radix code */
4897 mp_radix_size(mp_int *a, int radix, int *size)
4906 if (radix == 2) {
4911 /* make sure the radix is in range */
4912 if (radix < 2 || radix > 64) {
4939 if ((res = signed_divide_word(&t, (mp_digit) radix, &t, &d)) != MP_OKAY) {
4954 /* stores a bignum as a ASCII string in a given radix (2..64)
4959 mp_toradix_n(mp_int * a, char *str, int radix, int maxlen)
4966 /* check range of the maxlen, radix */
4967 if (maxlen < 2 || radix < 2 || radix > 64) {
5001 if ((res = signed_divide_word(&t, (mp_digit) radix, &t, &d)) != MP_OKAY) {
5005 /* LINTED -- radix' range is checked above, limits d's range */
5023 formatbn(const BIGNUM *a, const int radix)
5028 if (mp_radix_size(__UNCONST(a), radix, &len) != MP_OKAY) {
5032 if (mp_toradix_n(__UNCONST(a), s, radix, len) != MP_OKAY) {
5041 mp_getradix_num(mp_int *a, int radix, char *s)
5057 /* find y in the radix map */
5058 for (y = 0; y < radix; y++) {
5063 if (y == radix) {
5068 if ((err = multiply_digit(a, radix, a)) != MP_OKAY) {
5085 getbn(BIGNUM **a, const char *str, int radix)
5092 if (mp_getradix_num(*a, radix, __UNCONST(str)) != MP_OKAY) {
5095 mp_radix_size(__UNCONST(*a), radix, &len);
5593 BN_bn2radix(const BIGNUM *a, unsigned radix)
5595 return (a == NULL) ? NULL : formatbn(a, (int)radix);
5692 BN_radix2bn(BIGNUM **a, const char *str, unsigned radix)
5694 return getbn(a, str, (int)radix);