src/jdk.crypto.ec/share/native/libsunec/impl/ecl_mult.c
changeset 51120 dccdf51b10dd
parent 47216 71c04702a3d5
equal deleted inserted replaced
51091:a602706ccaaa 51120:dccdf51b10dd
     1 /*
     1 /*
     2  * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * Use is subject to license terms.
     3  * Use is subject to license terms.
     4  *
     4  *
     5  * This library is free software; you can redistribute it and/or
     5  * This library is free software; you can redistribute it and/or
     6  * modify it under the terms of the GNU Lesser General Public
     6  * modify it under the terms of the GNU Lesser General Public
     7  * License as published by the Free Software Foundation; either
     7  * License as published by the Free Software Foundation; either
    78                         MP_CHECKOK(group->
    78                         MP_CHECKOK(group->
    79                                            point_mul(&kt, &group->genx, &group->geny, rx, ry,
    79                                            point_mul(&kt, &group->genx, &group->geny, rx, ry,
    80                                                                  group, timing));
    80                                                                  group, timing));
    81                 }
    81                 }
    82         } else {
    82         } else {
       
    83                 kt.flag = (mp_sign)0;
    83                 if (group->meth->field_enc) {
    84                 if (group->meth->field_enc) {
    84                         MP_CHECKOK(group->meth->field_enc(px, rx, group->meth));
    85                         MP_CHECKOK(group->meth->field_enc(px, rx, group->meth));
    85                         MP_CHECKOK(group->meth->field_enc(py, ry, group->meth));
    86                         MP_CHECKOK(group->meth->field_enc(py, ry, group->meth));
    86                         MP_CHECKOK(group->point_mul(&kt, rx, ry, rx, ry, group, timing));
    87                         MP_CHECKOK(group->point_mul(&kt, rx, ry, rx, ry, group, timing));
    87                 } else {
    88                 } else {
    88                         kt.flag = (mp_sign)0;
       
    89                         MP_CHECKOK(group->point_mul(&kt, px, py, rx, ry, group, timing));
    89                         MP_CHECKOK(group->point_mul(&kt, px, py, rx, ry, group, timing));
    90                 }
    90                 }
    91         }
    91         }
    92         if (group->meth->field_dec) {
    92         if (group->meth->field_dec) {
    93                 MP_CHECKOK(group->meth->field_dec(rx, rx, group->meth));
    93                 MP_CHECKOK(group->meth->field_dec(rx, rx, group->meth));