License | BSD-style |
---|---|

Maintainer | Vincent Hanquez <vincent@snarc.org> |

Stability | experimental |

Portability | unknown |

Safe Haskell | None |

Language | Haskell2010 |

Utilities related to Elliptic Curve certificates and keys.

## Synopsis

- unserializePoint :: Curve -> SerializedPoint -> Maybe Point
- ecPubKeyCurve :: PubKeyEC -> Maybe Curve
- ecPubKeyCurveName :: PubKeyEC -> Maybe CurveName
- ecPrivKeyCurve :: PrivKeyEC -> Maybe Curve
- ecPrivKeyCurveName :: PrivKeyEC -> Maybe CurveName
- lookupCurveNameByOID :: OID -> Maybe CurveName

# Documentation

unserializePoint :: Curve -> SerializedPoint -> Maybe Point #

Read an EC point from a serialized format and make sure the point is valid for the specified curve.

ecPubKeyCurve :: PubKeyEC -> Maybe Curve #

Return the curve associated to an EC Public Key. This does not check
if a curve in explicit format is valid: if the input is not trusted one
should consider `ecPubKeyCurveName`

instead.

ecPubKeyCurveName :: PubKeyEC -> Maybe CurveName #

Return the name of a standard curve associated to an EC Public Key

ecPrivKeyCurve :: PrivKeyEC -> Maybe Curve #

Return the EC curve associated to an EC Private Key. This does not check
if a curve in explicit format is valid: if the input is not trusted one
should consider `ecPrivKeyCurveName`

instead.

ecPrivKeyCurveName :: PrivKeyEC -> Maybe CurveName #

Return the name of a standard curve associated to an EC Private Key

lookupCurveNameByOID :: OID -> Maybe CurveName #

Return the curve name associated to an OID