| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
package stdlib |
| 7 |
|
| 8 |
import ( |
| 9 |
"crypto/elliptic" |
| 10 |
"math/big" |
| 11 |
"reflect" |
| 12 |
) |
| 13 |
|
| 14 |
func init() { |
| 15 |
Symbols["crypto/elliptic/elliptic"] = map[string]reflect.Value{ |
| 16 |
|
| 17 |
"GenerateKey": reflect.ValueOf(elliptic.GenerateKey), |
| 18 |
"Marshal": reflect.ValueOf(elliptic.Marshal), |
| 19 |
"MarshalCompressed": reflect.ValueOf(elliptic.MarshalCompressed), |
| 20 |
"P224": reflect.ValueOf(elliptic.P224), |
| 21 |
"P256": reflect.ValueOf(elliptic.P256), |
| 22 |
"P384": reflect.ValueOf(elliptic.P384), |
| 23 |
"P521": reflect.ValueOf(elliptic.P521), |
| 24 |
"Unmarshal": reflect.ValueOf(elliptic.Unmarshal), |
| 25 |
"UnmarshalCompressed": reflect.ValueOf(elliptic.UnmarshalCompressed), |
| 26 |
|
| 27 |
|
| 28 |
"Curve": reflect.ValueOf((*elliptic.Curve)(nil)), |
| 29 |
"CurveParams": reflect.ValueOf((*elliptic.CurveParams)(nil)), |
| 30 |
|
| 31 |
|
| 32 |
"_Curve": reflect.ValueOf((*_crypto_elliptic_Curve)(nil)), |
| 33 |
} |
| 34 |
} |
| 35 |
|
| 36 |
|
| 37 |
type _crypto_elliptic_Curve struct { |
| 38 |
IValue interface{} |
| 39 |
WAdd func(x1 *big.Int, y1 *big.Int, x2 *big.Int, y2 *big.Int) (x *big.Int, y *big.Int) |
| 40 |
WDouble func(x1 *big.Int, y1 *big.Int) (x *big.Int, y *big.Int) |
| 41 |
WIsOnCurve func(x *big.Int, y *big.Int) bool |
| 42 |
WParams func() *elliptic.CurveParams |
| 43 |
WScalarBaseMult func(k []byte) (x *big.Int, y *big.Int) |
| 44 |
WScalarMult func(x1 *big.Int, y1 *big.Int, k []byte) (x *big.Int, y *big.Int) |
| 45 |
} |
| 46 |
|
| 47 |
func (W _crypto_elliptic_Curve) Add(x1 *big.Int, y1 *big.Int, x2 *big.Int, y2 *big.Int) (x *big.Int, y *big.Int) { |
| 48 |
return W.WAdd(x1, y1, x2, y2) |
| 49 |
} |
| 50 |
func (W _crypto_elliptic_Curve) Double(x1 *big.Int, y1 *big.Int) (x *big.Int, y *big.Int) { |
| 51 |
return W.WDouble(x1, y1) |
| 52 |
} |
| 53 |
func (W _crypto_elliptic_Curve) IsOnCurve(x *big.Int, y *big.Int) bool { return W.WIsOnCurve(x, y) } |
| 54 |
func (W _crypto_elliptic_Curve) Params() *elliptic.CurveParams { return W.WParams() } |
| 55 |
func (W _crypto_elliptic_Curve) ScalarBaseMult(k []byte) (x *big.Int, y *big.Int) { |
| 56 |
return W.WScalarBaseMult(k) |
| 57 |
} |
| 58 |
func (W _crypto_elliptic_Curve) ScalarMult(x1 *big.Int, y1 *big.Int, k []byte) (x *big.Int, y *big.Int) { |
| 59 |
return W.WScalarMult(x1, y1, k) |
| 60 |
} |