## Index

### Classes

- RingSig
- SignatureVerification

### Variables

- ed25519

### Functions

- Sign
- Verify
- createStreamFromBlake
- decodeSignature
- signH1
- signH1pre
- sortSet

## Variables

### Const ed25519

ed25519: Ed25519 = new curve.edwards25519.Curve()

- Defined in src/personhood/ring-sig.ts:7

## Functions

### Sign

- Sign(message: Buffer, anonymitySet: Point[], linkScope: Buffer, privateKey: Scalar): Promise<RingSig>

- - Defined in src/personhood/ring-sig.ts:45

  Sign a message using (un)linkable ring signature. This method is ported from the Kyber Golang version available at https://github.com/dedis/kyber/blob/master/sign/anon/sig.go. Please refer to the documentation of the given link for detailed instructions. This port stick to the Go implementation, however the hashing function used here is Blake2xs, whereas Blake2xb is used in the Golang version.

  #### Parameters

  - ##### message: Buffer

    the message to be signed

  - ##### anonymitySet: Point[]

    an array containing the public keys of the group

  - ##### linkScope: Buffer

  - ##### privateKey: Scalar

    the private key of the signer

  #### Returns Promise<RingSig>

  - the signature

### Verify

- Verify(message: Buffer, anonymitySet: Point[], linkScope: Buffer, signatureBuffer: Buffer): Promise<SignatureVerification>

- - Defined in src/personhood/ring-sig.ts:110

  Verify the signature of a message a message using (un)linkable ring signature. This method is ported from the Kyber Golang version available at https://github.com/dedis/kyber/blob/master/sign/anon/sig.go. Please refer to the documentation of the given link for detailed instructions. This port stick to the Go implementation, however the hashing function used here is Blake2xs, whereas Blake2xb is used in the Golang version.

  #### Parameters

  - ##### message: Buffer

    the message to be signed

  - ##### anonymitySet: Point[]

    an array containing the public keys of the group

  - ##### linkScope: Buffer

  - ##### signatureBuffer: Buffer

    the signature the will be verified

  #### Returns Promise<SignatureVerification>

  - contains the property of the verification

### createStreamFromBlake

- createStreamFromBlake(blakeInstance: BLAKE2Xs): function

- - Defined in src/personhood/ring-sig.ts:169

  #### Parameters

  - ##### blakeInstance: BLAKE2Xs

  #### Returns function

  - - (a: number): Buffer

    - #### Parameters

      - ##### a: number

      #### Returns Buffer

### decodeSignature

- decodeSignature(signatureBuffer: Buffer, isLinkableSig: boolean): RingSig

- - Defined in src/personhood/ring-sig.ts:214

  #### Parameters

  - ##### signatureBuffer: Buffer

  - ##### isLinkableSig: boolean

  #### Returns RingSig

### signH1

- signH1(H1pre: BLAKE2Xs, PG: Point, PH: Point): Scalar

- - Defined in src/personhood/ring-sig.ts:200

  #### Parameters

  - ##### H1pre: BLAKE2Xs

  - ##### PG: Point

  - ##### PH: Point

  #### Returns Scalar

### signH1pre

- signH1pre(linkScope: Buffer, linkTag: Point, message: Buffer): any

- - Defined in src/personhood/ring-sig.ts:186

  #### Parameters

  - ##### linkScope: Buffer

  - ##### linkTag: Point

  - ##### message: Buffer

  #### Returns any

### sortSet

- sortSet(anonymitySet: Point[], privateKey: Scalar): Promise<number>

- - Defined in src/personhood/ring-sig.ts:239

  #### Parameters

  - ##### anonymitySet: Point[]

  - ##### privateKey: Scalar

  #### Returns Promise<number>

Generated using TypeDoc