<commit_before># List of Used Keys

Following keys are used in the PowerAuth cryptography scheme.

<table>
	<tr>
		<th>name</th>
		<th>created as</th>
		<th>purpose</th>
	</tr>
	<tr>
		<td><code>KEY_DEVICE_PRIVATE</code></td>
		<td>ECDH - private key</td>
		<td>Generated on client to allow construction of <code>KEY_MASTER_SECRET</code></td>
	</tr>
	<tr>
		<td><code>KEY_DEVICE_PUBLIC</code></td>
		<td>ECDH - public key</td>
		<td>Generated on client to allow construction of <code>KEY_MASTER_SECRET</code></td>
	</tr>
	<tr>
		<td><code>KEY_SERVER_PRIVATE</code></td>
		<td>ECDH - private key</td>
		<td>Generated on server to allow construction of <code>KEY_MASTER_SECRET</code></td>
	</tr>
	<tr>
		<td><code>KEY_SERVER_PUBLIC</code></td>
		<td>ECDH - public key</td>
		<td>Generated on server to allow construction of <code>KEY_MASTER_SECRET</code></td>
	</tr>
	<tr>
		<td><code>KEY_SERVER_MASTER_PRIVATE</code></td>
		<td>ECDH - private key</td>
		<td>Stored on server, used to assure authenticity of <code>KEY_DEVICE_PUBLIC</code> while transferring from server to client</td>
	</tr>
	<tr>
		<td><code>KEY_SERVER_MASTER_PUBLIC</code></td>
		<td>ECDH - public key</td>
		<td>Stored on client, used to assure authenticity of <code>KEY_DEVICE_PUBLIC</code> while transferring from server to client</td>
	</tr>
	<tr>
		<td><code>KEY_MASTER_SECRET</code></td>
		<td>ECDH - pre-shared</td>
		<td>A key deduced using ECDH derivation, <code>KEY_MASTER_SECRET = ECDH.phase(KEY_DEVICE_PRIVATE,KEY_SERVER_PUBLIC) = ECDH.phase(KEY_SERVER_PRIVATE,KEY_DEVICE_PUBLIC)</code></td>
	</tr>
	<tr>
		<td><code>KEY_SIGNATURE_POSSESSION</code></td>
		<td>KDF derived key from <code>KEY_MASTER_SECRET</code></td>
		<td>A signing key associated with the possession, factor deduced using KDF derivation with <code>INDEX = 1</code>, <code>KEY_SIGNATURE_POSSESSION = KDF.expand(KEY_MASTER_SECRET, INDEX)</code>, used for subsequent request signing</td>
	</tr>
  <tr>
		<td><code>KEY_SIGNATURE_KNOWLEDGE</code></td>
		<td>KDF derived key from <code>KEY_MASTER_SECRET</code></td>
		<td>A key associated with the knowledge factor, deduced using KDF derivation with <code>INDEX = 2</code>, <code>KEY_SIGNATURE_KNOWLEDGE = KDF.expand(KEY_MASTER_SECRET, INDEX)</code>, used for subsequent request signing</td>
	</tr>
  <tr>
		<td><code>KEY_SIGNATURE_BIOMETRY</code></td>
		<td>KDF derived key from <code>KEY_MASTER_SECRET</code></td>
		<td>A key associated with the biometry factor, deduced using KDF derivation with <code>INDEX = 3</code>, <code>KEY_SIGNATURE_BIOMETRY = KDF.derive(KEY_MASTER_SECRET, INDEX)</code>, used for subsequent request signing</td>
	</tr>
	<tr>
		<td><code>KEY_TRANSPORT</code></td>
		<td>KDF derived key from <code>KEY_MASTER_SECRET</code></td>
		<td>A key deduced using KDF derivation with <code>INDEX = 1000</code>, <code>KEY_TRANSPORT = KDF.expand(KEY_MASTER_SECRET, INDEX)</code>, used for encrypted data transport. This key is used as master transport key for end-to-end encryption key derivation.</td>
	</tr>
</table><commit_msg>Documentation: Changed table from HTML to MD syntax<commit_after># List of Used Keys

Following keys are used in the PowerAuth cryptography scheme.

| name | created as | purpose |
|---|---|---|
| `KEY_DEVICE_PRIVATE` | ECDH - private key | Generated on client to allow construction of `KEY_MASTER_SECRET` |
| `KEY_DEVICE_PUBLIC`  | ECDH - public key  | Generated on client to allow construction of `KEY_MASTER_SECRET` |
| `KEY_SERVER_PRIVATE` | ECDH - private key | Generated on server to allow construction of `KEY_MASTER_SECRET` |
| `KEY_SERVER_PUBLIC`  | ECDH - public key  | Generated on server to allow construction of `KEY_MASTER_SECRET` |
| `KEY_SERVER_MASTER_PRIVATE` | ECDH - private key | Stored on server, used to assure authenticity of `KEY_DEVICE_PUBLIC` while transferring from server to client |
| `KEY_SERVER_MASTER_PUBLIC`  | ECDH - public key  | Stored on client, used to assure authenticity of `KEY_DEVICE_PUBLIC` while transferring from server to client |
| `KEY_MASTER_SECRET`         | ECDH - pre-shared  | A key deduced using ECDH derivation, `KEY_MASTER_SECRET = ECDH.phase(KEY_DEVICE_PRIVATE,KEY_SERVER_PUBLIC) = ECDH.phase(KEY_SERVER_PRIVATE,KEY_DEVICE_PUBLIC)` |
| `KEY_SIGNATURE_POSSESSION`  | KDF derived key from `KEY_MASTER_SECRET` | A signing key associated with the possession, factor deduced using KDF derivation with `INDEX = 1`, `KEY_SIGNATURE_POSSESSION = KDF.expand(KEY_MASTER_SECRET, INDEX)`, used for subsequent request signing |
| `KEY_SIGNATURE_KNOWLEDGE`   | KDF derived key from `KEY_MASTER_SECRET` | A key associated with the knowledge factor, deduced using KDF derivation with `INDEX = 2`, `KEY_SIGNATURE_KNOWLEDGE = KDF.expand(KEY_MASTER_SECRET, INDEX)`, used for subsequent request signing |
| `KEY_SIGNATURE_BIOMETRY`    | KDF derived key from `KEY_MASTER_SECRET` | A key associated with the biometry factor, deduced using KDF derivation with `INDEX = 3`, `KEY_SIGNATURE_BIOMETRY = KDF.derive(KEY_MASTER_SECRET, INDEX)`, used for subsequent request signing |
| `KEY_TRANSPORT`             | KDF derived key from `KEY_MASTER_SECRET` | A key deduced using KDF derivation with `INDEX = 1000`, `KEY_TRANSPORT = KDF.expand(KEY_MASTER_SECRET, INDEX)`, used for encrypted data transport. This key is used as master transport key for end-to-end encryption key derivation. |
{'fraction_non_alphanumeric': 0.12093457943925234, 'fraction_numerical': 0.002616822429906542, 'mean_word_length': 5.2952941176470585, 'pattern_counts': {'":': 0, '<': 161, '<?xml version=': 0, '>': 161, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2818141', 'n_tokens_mistral': 1965, 'n_tokens_neox': 1866, 'n_words': 506}