<commit_before># Anoncreds Design

Here you can find the requirements and design for Indy SDK Anoncreds workflow (including revocation).

* [Anoncreds References](#anoncreds-references)
* [Design Goals](#design-goals)
* [Anoncreds Workflow](#anoncreds-workflow)
* [API](#api)

## Anoncreds References

Anoncreds protocol links:

* [Anoncreds Workflow](#anoncreds-workflow)
* [Anoncreds Requirements](https://github.com/hyperledger/indy-node/blob/master/design/anoncreds.md#requirements)
* Indy Node Anoncreds transactions:
  * [SCHEMA](https://github.com/hyperledger/indy-node/blob/master/design/anoncreds.md##schema)
  * [CRED_DEF](https://github.com/hyperledger/indy-node/blob/master/design/anoncreds.md##cred_def)
  * [REVOC_REG_DEF](https://github.com/hyperledger/indy-node/blob/master/design/anoncreds.md##revoc_reg_def)
  * [REVOC_REG_ENTRY](https://github.com/hyperledger/indy-node/blob/master/design/anoncreds.md##revoc_reg_entry)
  * [Timestamp Support in State](https://github.com/hyperledger/indy-node/blob/master/design/anoncreds.md#timestamp-support-in-state)
  * [GET_OBJ](https://github.com/hyperledger/indy-node/blob/master/design/anoncreds.md#get_obj)
  * [Issuer Key Rotation](https://github.com/hyperledger/indy-node/blob/master/design/anoncreds.md#issuer-key-rotation)
* [Anoncreds Math](https://github.com/hyperledger/indy-crypto/blob/master/libindy-crypto/docs/AnonCred.pdf)
* [Anoncreds Protocol Crypto API](https://github.com/hyperledger/indy-crypto/blob/master/libindy-crypto/docs/anoncreds-design.md)

## Design Goals

* Indy SDK and Indy Node should use the same format for public Anoncreds entities (Schema, Credential Definition, Revocation Registry Definition, Revocation Registry Delta)
* Indy SDK and Indy Node should use the same entities referencing approach
* It should be possible to integrate additional credential signature and revocation schemas without breaking API changes
* API should provide flexible and pluggable approach to handle revocation tails files
* API should provide the way to calculate revocation witness values on cloud agent to avoid downloading of the hole tails file on edge devices

## Anoncreds Workflow

<img src="./libindy-anoncreds.svg">

## API

### Issuer<commit_msg>fix broken link for anoncreds flow<commit_after># Anoncreds Design

Here you can find the requirements and design for Indy SDK Anoncreds workflow (including revocation).

* [Anoncreds References](#anoncreds-references)
* [Design Goals](#design-goals)
* [Anoncreds Workflow](#anoncreds-workflow)
* [API](#api)

## Anoncreds References

Anoncreds protocol links:

* [Anoncreds Workflow](#anoncreds-workflow)
* [Anoncreds Requirements](https://github.com/hyperledger/indy-node/blob/master/design/anoncreds.md#requirements)
* Indy Node Anoncreds transactions:
  * [SCHEMA](https://github.com/hyperledger/indy-node/blob/master/design/anoncreds.md##schema)
  * [CRED_DEF](https://github.com/hyperledger/indy-node/blob/master/design/anoncreds.md##cred_def)
  * [REVOC_REG_DEF](https://github.com/hyperledger/indy-node/blob/master/design/anoncreds.md##revoc_reg_def)
  * [REVOC_REG_ENTRY](https://github.com/hyperledger/indy-node/blob/master/design/anoncreds.md##revoc_reg_entry)
  * [Timestamp Support in State](https://github.com/hyperledger/indy-node/blob/master/design/anoncreds.md#timestamp-support-in-state)
  * [GET_OBJ](https://github.com/hyperledger/indy-node/blob/master/design/anoncreds.md#get_obj)
  * [Issuer Key Rotation](https://github.com/hyperledger/indy-node/blob/master/design/anoncreds.md#issuer-key-rotation)
* [Anoncreds Math](https://github.com/hyperledger/indy-crypto/blob/master/libindy-crypto/docs/AnonCred.pdf)
* [Anoncreds Protocol Crypto API](https://github.com/hyperledger/indy-crypto/blob/master/libindy-crypto/docs/anoncreds-design.md)

## Design Goals

* Indy SDK and Indy Node should use the same format for public Anoncreds entities (Schema, Credential Definition, Revocation Registry Definition, Revocation Registry Delta)
* Indy SDK and Indy Node should use the same entities referencing approach
* It should be possible to integrate additional credential signature and revocation schemas without breaking API changes
* API should provide flexible and pluggable approach to handle revocation tails files
* API should provide the way to calculate revocation witness values on cloud agent to avoid downloading of the hole tails file on edge devices

## Anoncreds Workflow

<img src="./anoncreds-workflow.svg">

## API

### Issuer
{'fraction_non_alphanumeric': 0.11848552338530066, 'fraction_numerical': 0.0, 'mean_word_length': 5.743243243243243, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 20, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '108186', 'n_tokens_mistral': 1494, 'n_tokens_neox': 1408, 'n_words': 306}