| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Plutarch.Builtin.BLS
Synopsis
- newtype PBuiltinBLS12_381_G1_Element (s :: S) = PBuiltinBLS12_381_G1_Element (Term s POpaque)
- newtype PBuiltinBLS12_381_G2_Element (s :: S) = PBuiltinBLS12_381_G2_Element (Term s POpaque)
- newtype PBuiltinBLS12_381_MlResult (s :: S) = PBuiltinBLS12_381_MlResult (Term s POpaque)
- pbls12_381_G1_add :: forall (s :: S). Term s (PBuiltinBLS12_381_G1_Element :--> (PBuiltinBLS12_381_G1_Element :--> PBuiltinBLS12_381_G1_Element))
- pbls12_381_G1_scalarMul :: forall (s :: S). Term s (PInteger :--> (PBuiltinBLS12_381_G1_Element :--> PBuiltinBLS12_381_G1_Element))
- pbls12_381_G1_neg :: forall (s :: S). Term s (PBuiltinBLS12_381_G1_Element :--> PBuiltinBLS12_381_G1_Element)
- pbls12_381_G1_compress :: forall (s :: S). Term s (PBuiltinBLS12_381_G1_Element :--> PByteString)
- pbls12_381_G1_uncompress :: forall (s :: S). Term s (PByteString :--> PBuiltinBLS12_381_G1_Element)
- pbls12_381_G1_hashToGroup :: forall (s :: S). Term s (PByteString :--> (PByteString :--> PBuiltinBLS12_381_G1_Element))
- pbls12_381_G1_compressed_zero :: forall (s :: S). Term s PByteString
- pbls12_381_G1_compressed_generator :: forall (s :: S). Term s PByteString
- pbls12_381_G2_add :: forall (s :: S). Term s (PBuiltinBLS12_381_G2_Element :--> (PBuiltinBLS12_381_G2_Element :--> PBuiltinBLS12_381_G2_Element))
- pbls12_381_G2_scalarMul :: forall (s :: S). Term s (PInteger :--> (PBuiltinBLS12_381_G2_Element :--> PBuiltinBLS12_381_G2_Element))
- pbls12_381_G2_neg :: forall (s :: S). Term s (PBuiltinBLS12_381_G2_Element :--> PBuiltinBLS12_381_G2_Element)
- pbls12_381_G2_compress :: forall (s :: S). Term s (PBuiltinBLS12_381_G2_Element :--> PByteString)
- pbls12_381_G2_uncompress :: forall (s :: S). Term s (PByteString :--> PBuiltinBLS12_381_G2_Element)
- pbls12_381_G2_hashToGroup :: forall (s :: S). Term s (PByteString :--> (PByteString :--> PBuiltinBLS12_381_G2_Element))
- pbls12_381_G2_compressed_zero :: forall (s :: S). Term s PByteString
- pbls12_381_G2_compressed_generator :: forall (s :: S). Term s PByteString
- pbls12_381_millerLoop :: forall (s :: S). Term s (PBuiltinBLS12_381_G1_Element :--> (PBuiltinBLS12_381_G2_Element :--> PBuiltinBLS12_381_MlResult))
- pbls12_381_mulMlResult :: forall (s :: S). Term s (PBuiltinBLS12_381_MlResult :--> (PBuiltinBLS12_381_MlResult :--> PBuiltinBLS12_381_MlResult))
- pbls12_381_finalVerify :: forall (s :: S). Term s (PBuiltinBLS12_381_MlResult :--> (PBuiltinBLS12_381_MlResult :--> PBool))
Documentation
newtype PBuiltinBLS12_381_G1_Element (s :: S) Source #
A point on the BLS12-381 G1 curve.
Since: 1.9.0
Constructors
| PBuiltinBLS12_381_G1_Element (Term s POpaque) |
Instances
newtype PBuiltinBLS12_381_G2_Element (s :: S) Source #
Since: 1.9.0
Constructors
| PBuiltinBLS12_381_G2_Element (Term s POpaque) |
Instances
| PEq PBuiltinBLS12_381_G2_Element Source # | |||||||||
Defined in Plutarch.Internal.Eq Methods (#==) :: forall (s :: S). Term s PBuiltinBLS12_381_G2_Element -> Term s PBuiltinBLS12_381_G2_Element -> Term s PBool Source # | |||||||||
| PLiftable PBuiltinBLS12_381_G2_Element Source # | |||||||||
Defined in Plutarch.Internal.Lift Associated Types
Methods haskToRepr :: AsHaskell PBuiltinBLS12_381_G2_Element -> PlutusRepr PBuiltinBLS12_381_G2_Element Source # reprToHask :: PlutusRepr PBuiltinBLS12_381_G2_Element -> Either LiftError (AsHaskell PBuiltinBLS12_381_G2_Element) Source # reprToPlut :: forall (s :: S). PlutusRepr PBuiltinBLS12_381_G2_Element -> PLifted s PBuiltinBLS12_381_G2_Element Source # plutToRepr :: (forall (s :: S). PLifted s PBuiltinBLS12_381_G2_Element) -> Either LiftError (PlutusRepr PBuiltinBLS12_381_G2_Element) Source # | |||||||||
| PAdditiveGroup PBuiltinBLS12_381_G2_Element Source # | Since: 1.10.0 | ||||||||
Defined in Plutarch.Internal.Numeric Methods pnegate :: forall (s :: S). Term s (PBuiltinBLS12_381_G2_Element :--> PBuiltinBLS12_381_G2_Element) Source # (#-) :: forall (s :: S). Term s PBuiltinBLS12_381_G2_Element -> Term s PBuiltinBLS12_381_G2_Element -> Term s PBuiltinBLS12_381_G2_Element Source # pscaleInteger :: forall (s :: S). Term s PBuiltinBLS12_381_G2_Element -> Term s PInteger -> Term s PBuiltinBLS12_381_G2_Element Source # | |||||||||
| PAdditiveMonoid PBuiltinBLS12_381_G2_Element Source # | Since: 1.10.0 | ||||||||
Defined in Plutarch.Internal.Numeric Methods pzero :: forall (s :: S). Term s PBuiltinBLS12_381_G2_Element Source # pscaleNatural :: forall (s :: S). Term s PBuiltinBLS12_381_G2_Element -> Term s PNatural -> Term s PBuiltinBLS12_381_G2_Element Source # | |||||||||
| PAdditiveSemigroup PBuiltinBLS12_381_G2_Element Source # | Since: 1.10.0 | ||||||||
Defined in Plutarch.Internal.Numeric Methods (#+) :: forall (s :: S). Term s PBuiltinBLS12_381_G2_Element -> Term s PBuiltinBLS12_381_G2_Element -> Term s PBuiltinBLS12_381_G2_Element Source # pscalePositive :: forall (s :: S). Term s PBuiltinBLS12_381_G2_Element -> Term s PPositive -> Term s PBuiltinBLS12_381_G2_Element Source # | |||||||||
| PlutusType PBuiltinBLS12_381_G2_Element Source # | |||||||||
Defined in Plutarch.Internal.PlutusType Associated Types
Methods pcon' :: forall (s :: S). PBuiltinBLS12_381_G2_Element s -> Term s (PInner PBuiltinBLS12_381_G2_Element) Source # pmatch' :: forall (s :: S) (b :: S -> Type). Term s (PInner PBuiltinBLS12_381_G2_Element) -> (PBuiltinBLS12_381_G2_Element s -> Term s b) -> Term s b Source # | |||||||||
| PMonoid PBuiltinBLS12_381_G2_Element Source # | Since: 1.10.0 | ||||||||
Defined in Plutarch.Internal.Semigroup | |||||||||
| PSemigroup PBuiltinBLS12_381_G2_Element Source # | Since: 1.10.0 | ||||||||
Defined in Plutarch.Internal.Semigroup Methods (#<>) :: forall (s :: S). Term s PBuiltinBLS12_381_G2_Element -> Term s PBuiltinBLS12_381_G2_Element -> Term s PBuiltinBLS12_381_G2_Element Source # pstimes :: forall (s :: S). Term s PPositive -> Term s PBuiltinBLS12_381_G2_Element -> Term s PBuiltinBLS12_381_G2_Element Source # | |||||||||
| Generic (PBuiltinBLS12_381_G2_Element s) Source # | |||||||||
Defined in Plutarch.Builtin.BLS Associated Types
Methods from :: PBuiltinBLS12_381_G2_Element s -> Rep (PBuiltinBLS12_381_G2_Element s) x Source # to :: Rep (PBuiltinBLS12_381_G2_Element s) x -> PBuiltinBLS12_381_G2_Element s Source # | |||||||||
| Generic (PBuiltinBLS12_381_G2_Element s) Source # | |||||||||
Defined in Plutarch.Builtin.BLS Associated Types
Methods from :: PBuiltinBLS12_381_G2_Element s -> Rep (PBuiltinBLS12_381_G2_Element s) to :: Rep (PBuiltinBLS12_381_G2_Element s) -> PBuiltinBLS12_381_G2_Element s | |||||||||
| type AsHaskell PBuiltinBLS12_381_G2_Element Source # | Since: 1.10.0 | ||||||||
Defined in Plutarch.Internal.Lift | |||||||||
| type PlutusRepr PBuiltinBLS12_381_G2_Element Source # | |||||||||
Defined in Plutarch.Internal.Lift | |||||||||
| type PInner PBuiltinBLS12_381_G2_Element Source # | Since: 1.10.0 | ||||||||
| type Rep (PBuiltinBLS12_381_G2_Element s) Source # | |||||||||
Defined in Plutarch.Builtin.BLS type Rep (PBuiltinBLS12_381_G2_Element s) = D1 ('MetaData "PBuiltinBLS12_381_G2_Element" "Plutarch.Builtin.BLS" "plutarch-1.14.0-6fw3gqGsL7f3TFINWPu1lG" 'True) (C1 ('MetaCons "PBuiltinBLS12_381_G2_Element" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s POpaque)))) | |||||||||
| type Code (PBuiltinBLS12_381_G2_Element s) Source # | |||||||||
Defined in Plutarch.Builtin.BLS | |||||||||
newtype PBuiltinBLS12_381_MlResult (s :: S) Source #
Represents the result of a Miller loop operation in BLS12-381 pairing.
Since: 1.9.0
Constructors
| PBuiltinBLS12_381_MlResult (Term s POpaque) |
Instances
| PLiftable PBuiltinBLS12_381_MlResult Source # | |||||||||
Defined in Plutarch.Internal.Lift Associated Types
Methods haskToRepr :: AsHaskell PBuiltinBLS12_381_MlResult -> PlutusRepr PBuiltinBLS12_381_MlResult Source # reprToHask :: PlutusRepr PBuiltinBLS12_381_MlResult -> Either LiftError (AsHaskell PBuiltinBLS12_381_MlResult) Source # reprToPlut :: forall (s :: S). PlutusRepr PBuiltinBLS12_381_MlResult -> PLifted s PBuiltinBLS12_381_MlResult Source # plutToRepr :: (forall (s :: S). PLifted s PBuiltinBLS12_381_MlResult) -> Either LiftError (PlutusRepr PBuiltinBLS12_381_MlResult) Source # | |||||||||
| PMultiplicativeSemigroup PBuiltinBLS12_381_MlResult Source # | Since: 1.10.0 | ||||||||
Defined in Plutarch.Internal.Numeric Methods (#*) :: forall (s :: S). Term s PBuiltinBLS12_381_MlResult -> Term s PBuiltinBLS12_381_MlResult -> Term s PBuiltinBLS12_381_MlResult Source # ppowPositive :: forall (s :: S). Term s PBuiltinBLS12_381_MlResult -> Term s PPositive -> Term s PBuiltinBLS12_381_MlResult Source # | |||||||||
| PlutusType PBuiltinBLS12_381_MlResult Source # | |||||||||
Defined in Plutarch.Internal.PlutusType Associated Types
Methods pcon' :: forall (s :: S). PBuiltinBLS12_381_MlResult s -> Term s (PInner PBuiltinBLS12_381_MlResult) Source # pmatch' :: forall (s :: S) (b :: S -> Type). Term s (PInner PBuiltinBLS12_381_MlResult) -> (PBuiltinBLS12_381_MlResult s -> Term s b) -> Term s b Source # | |||||||||
| PSemigroup PBuiltinBLS12_381_MlResult Source # | Since multiplication of Miller loop results exists, they are technically semigroups, though confusingly in a different way to BLS curve points. Since: 1.10.0 | ||||||||
Defined in Plutarch.Internal.Semigroup Methods (#<>) :: forall (s :: S). Term s PBuiltinBLS12_381_MlResult -> Term s PBuiltinBLS12_381_MlResult -> Term s PBuiltinBLS12_381_MlResult Source # pstimes :: forall (s :: S). Term s PPositive -> Term s PBuiltinBLS12_381_MlResult -> Term s PBuiltinBLS12_381_MlResult Source # | |||||||||
| Generic (PBuiltinBLS12_381_MlResult s) Source # | |||||||||
Defined in Plutarch.Builtin.BLS Associated Types
Methods from :: PBuiltinBLS12_381_MlResult s -> Rep (PBuiltinBLS12_381_MlResult s) x Source # to :: Rep (PBuiltinBLS12_381_MlResult s) x -> PBuiltinBLS12_381_MlResult s Source # | |||||||||
| Generic (PBuiltinBLS12_381_MlResult s) Source # | |||||||||
Defined in Plutarch.Builtin.BLS Associated Types
Methods from :: PBuiltinBLS12_381_MlResult s -> Rep (PBuiltinBLS12_381_MlResult s) to :: Rep (PBuiltinBLS12_381_MlResult s) -> PBuiltinBLS12_381_MlResult s | |||||||||
| type AsHaskell PBuiltinBLS12_381_MlResult Source # | Since: 1.10.0 | ||||||||
Defined in Plutarch.Internal.Lift | |||||||||
| type PlutusRepr PBuiltinBLS12_381_MlResult Source # | |||||||||
Defined in Plutarch.Internal.Lift | |||||||||
| type PInner PBuiltinBLS12_381_MlResult Source # | Since: 1.10.0 | ||||||||
| type Rep (PBuiltinBLS12_381_MlResult s) Source # | |||||||||
Defined in Plutarch.Builtin.BLS type Rep (PBuiltinBLS12_381_MlResult s) = D1 ('MetaData "PBuiltinBLS12_381_MlResult" "Plutarch.Builtin.BLS" "plutarch-1.14.0-6fw3gqGsL7f3TFINWPu1lG" 'True) (C1 ('MetaCons "PBuiltinBLS12_381_MlResult" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s POpaque)))) | |||||||||
| type Code (PBuiltinBLS12_381_MlResult s) Source # | |||||||||
Defined in Plutarch.Builtin.BLS | |||||||||
pbls12_381_G1_add :: forall (s :: S). Term s (PBuiltinBLS12_381_G1_Element :--> (PBuiltinBLS12_381_G1_Element :--> PBuiltinBLS12_381_G1_Element)) Source #
Add two points on the BLS12-381 G1 curve.
Since: 1.9.0
pbls12_381_G1_scalarMul :: forall (s :: S). Term s (PInteger :--> (PBuiltinBLS12_381_G1_Element :--> PBuiltinBLS12_381_G1_Element)) Source #
Multiply a point on the BLS12-381 G1 curve by a scalar.
Since: 1.9.0
pbls12_381_G1_neg :: forall (s :: S). Term s (PBuiltinBLS12_381_G1_Element :--> PBuiltinBLS12_381_G1_Element) Source #
Negate a point on the BLS12-381 G1 curve.
Since: 1.9.0
pbls12_381_G1_compress :: forall (s :: S). Term s (PBuiltinBLS12_381_G1_Element :--> PByteString) Source #
Compress a point on the BLS12-381 G1 curve to a byte string.
Since: 1.9.0
pbls12_381_G1_uncompress :: forall (s :: S). Term s (PByteString :--> PBuiltinBLS12_381_G1_Element) Source #
Uncompress a byte string to a point on the BLS12-381 G1 curve.
Since: 1.9.0
pbls12_381_G1_hashToGroup :: forall (s :: S). Term s (PByteString :--> (PByteString :--> PBuiltinBLS12_381_G1_Element)) Source #
Hash a message to a point on the BLS12-381 G1 curve.
Since: 1.9.0
pbls12_381_G1_compressed_zero :: forall (s :: S). Term s PByteString Source #
The compressed representation of the zero point on the BLS12-381 G1 curve.
Since: 1.9.0
pbls12_381_G1_compressed_generator :: forall (s :: S). Term s PByteString Source #
The compressed representation of the generator point on the BLS12-381 G1 curve.
Since: 1.9.0
pbls12_381_G2_add :: forall (s :: S). Term s (PBuiltinBLS12_381_G2_Element :--> (PBuiltinBLS12_381_G2_Element :--> PBuiltinBLS12_381_G2_Element)) Source #
Add two points on the BLS12-381 G2 curve.
Since: 1.9.0
pbls12_381_G2_scalarMul :: forall (s :: S). Term s (PInteger :--> (PBuiltinBLS12_381_G2_Element :--> PBuiltinBLS12_381_G2_Element)) Source #
Multiply a point on the BLS12-381 G2 curve by a scalar.
Since: 1.9.0
pbls12_381_G2_neg :: forall (s :: S). Term s (PBuiltinBLS12_381_G2_Element :--> PBuiltinBLS12_381_G2_Element) Source #
Negate a point on the BLS12-381 G2 curve.
Since: 1.9.0
pbls12_381_G2_compress :: forall (s :: S). Term s (PBuiltinBLS12_381_G2_Element :--> PByteString) Source #
Compress a point on the BLS12-381 G2 curve to a byte string.
Since: 1.9.0
pbls12_381_G2_uncompress :: forall (s :: S). Term s (PByteString :--> PBuiltinBLS12_381_G2_Element) Source #
Uncompress a byte string to a point on the BLS12-381 G2 curve.
Since: 1.9.0
pbls12_381_G2_hashToGroup :: forall (s :: S). Term s (PByteString :--> (PByteString :--> PBuiltinBLS12_381_G2_Element)) Source #
Hash a message to a point on the BLS12-381 G2 curve.
Since: 1.9.0
pbls12_381_G2_compressed_zero :: forall (s :: S). Term s PByteString Source #
The compressed representation of the zero point on the BLS12-381 G2 curve.
Since: 1.9.0
pbls12_381_G2_compressed_generator :: forall (s :: S). Term s PByteString Source #
The compressed representation of the generator point on the BLS12-381 G2 curve.
Since: 1.9.0
pbls12_381_millerLoop :: forall (s :: S). Term s (PBuiltinBLS12_381_G1_Element :--> (PBuiltinBLS12_381_G2_Element :--> PBuiltinBLS12_381_MlResult)) Source #
Perform a Miller loop operation on a G1 and G2 element.
Since: 1.9.0
pbls12_381_mulMlResult :: forall (s :: S). Term s (PBuiltinBLS12_381_MlResult :--> (PBuiltinBLS12_381_MlResult :--> PBuiltinBLS12_381_MlResult)) Source #
Multiply two Miller loop results.
Since: 1.9.0
pbls12_381_finalVerify :: forall (s :: S). Term s (PBuiltinBLS12_381_MlResult :--> (PBuiltinBLS12_381_MlResult :--> PBool)) Source #
Perform the final verification step in BLS12-381 pairing.
Since: 1.9.0