plutus-core-1.39.0.0: Language library for Plutus Core
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusCore.Crypto.BLS12_381.G2

Synopsis

Documentation

newtype Element Source #

See Note [Wrapping the BLS12-381 types in Plutus Core].

Constructors

Element 

Fields

Instances

Instances details
Show Element Source # 
Instance details

Defined in PlutusCore.Crypto.BLS12_381.G2

NFData Element Source # 
Instance details

Defined in PlutusCore.Crypto.BLS12_381.G2

Methods

rnfElement → () Source #

Flat Element Source #

We don't support direct flat encoding of G1 elements because of the expense of on-chain uncompression. Users should convert between G1 elements and bytestrings using compress and uncompress: the bytestrings can be flat-encoded in the usual way.

Instance details

Defined in PlutusCore.Crypto.BLS12_381.G2

Eq Element Source # 
Instance details

Defined in PlutusCore.Crypto.BLS12_381.G2

Methods

(==)ElementElementBool Source #

(/=)ElementElementBool Source #

Hashable Element Source # 
Instance details

Defined in PlutusCore.Crypto.BLS12_381.G2

Methods

hashWithSaltIntElementInt Source #

hashElementInt Source #

ExMemoryUsage Element Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemoryUsage

Pretty Element Source # 
Instance details

Defined in PlutusCore.Crypto.BLS12_381.G2

Methods

prettyElementDoc ann Source #

prettyList ∷ [Element] → Doc ann Source #

PrettyBy ConstConfig Element Source # 
Instance details

Defined in PlutusCore.Crypto.BLS12_381.G2

Methods

prettyByConstConfigElementDoc ann Source #

prettyListByConstConfig → [Element] → Doc ann Source #

KnownBuiltinTypeIn DefaultUni term ElementMakeKnownIn DefaultUni term Element Source # 
Instance details

Defined in PlutusCore.Default.Universe

KnownBuiltinTypeIn DefaultUni term ElementReadKnownIn DefaultUni term Element Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown ∷ term → ReadKnownM Element Source #

Contains DefaultUni Element Source # 
Instance details

Defined in PlutusCore.Default.Universe

KnownBuiltinTypeAst tyname DefaultUni ElementKnownTypeAst tyname DefaultUni Element Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

typeAstType tyname DefaultUni () Source #

type IsBuiltin DefaultUni Element Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc Element Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni hole Element Source # 
Instance details

Defined in PlutusCore.Default.Universe

addElementElementElement Source #

Add two G2 group elements

negElementElement Source #

Negate a G2 group element

compressElementByteString Source #

Compress a G2 element to a bytestring. This serialises a curve point to its x coordinate only, using an extra bit to determine which of two possible y coordinates the point has. The compressed bytestring is 96 bytes long. See https://github.com/supranational/blst#serialization-format

uncompressByteStringEither BLSTError Element Source #

Uncompress a bytestring to get a G2 point. This will fail if any of the following are true: * The bytestring is not exactly 96 bytes long * The most significant three bits are used incorrectly * The bytestring encodes a field element which is not the x coordinate of a point on the E2 curve * The bytestring does represent a point on the E2 curve, but the point is not in the G2 subgroup

offchain_zeroElement Source #

The zero element of G2. This cannot be flat-serialised and is provided only for off-chain testing.

compressed_zeroByteString Source #

The zero element of G2 compressed into a bytestring. This is provided for convenience in PlutusTx and is not exported as a builtin.

compressed_generatorByteString Source #

The standard generator of G2 compressed into a bytestring. This is provided for convenience in PlutusTx and is not exported as a builtin.

memSizeBytesInt Source #

Memory usage of a G2 point (288 bytes)

compressedSizeBytesInt Source #

Compressed size of a G2 point (96 bytes)