<commit_before>Outline of Behaviour
====================

- User's private key is derived from user's password
- Individual entries encrypted using user's private key
- Access control settings determine read, write, and delegate access to individual entries and groups of entries
- Change procedure:
 - User changes local entry
 - Change notification is encrypted for each user with read access to that entry using modifier's private key and reader's public key
 - Encrypted change notification pushed on to each user's change queue
 - When user logs in, queued changes are replayed into their local entries
 - Only the latest change may be queued for a particular entry, with the earlier one dropped if a newer one is enqueued
- Access to a particular entry must be granted after an account is created by a user who already has delegate access to the entry
- New user accounts start out with no entries
- There is a fixed admin user which lacks r/w permission but has delegate permission for all entries<commit_msg>Added outline of password change behaviour<commit_after>Outline of Behaviour
====================

- User's private key is derived from user's password
- Individual entries encrypted using user's private key
- Access control settings determine read, write, and delegate access to individual entries and groups of entries
- Change procedure:
    - User changes local entry
    - Change notification is encrypted for each user with read access to that entry using modifier's private key and reader's public key
    - Encrypted change notification pushed on to each user's change queue
    - When user logs in, queued changes are replayed into their local entries
    - Only the latest change may be queued for a particular entry, with the earlier one dropped if a newer one is enqueued
- Access to a particular entry must be granted after an account is created by a user who already has delegate access to the entry
- New user accounts start out with no entries
- There is a fixed admin user which lacks r/w permission but has delegate permission for all entries
- User password change procedure:
    - User's old key is temporarily cached
    - User's new key is calculated
    - Each stored entry in the database is evaluated to see if it was encrypted by this user
        - Entries that match are decrypted using the cached key and then re-encrypted using the new one
    - Each queued entry in the database is evaluated to see if it was encrypted by this user
        - Entries that match are decrypted using the cached key and then re-encrypted using the new one
    - Each grant in the database is evaluated to see if it corresponds to this user
        - Grants which match are re-signed using the new key
    - The cached old key is discarded
{'fraction_non_alphanumeric': 0.039783001808318265, 'fraction_numerical': 0.0, 'mean_word_length': 3.8272251308900525, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6829231', 'n_tokens_mistral': 619, 'n_tokens_neox': 587, 'n_words': 423}