Skip to content

Generate hashes for node answers and map to levels #20

@c0d3sw0t

Description

@c0d3sw0t

Extracted from documentation: T3-InfoSec/t3-memassist#10


What is the Problem or Limitation?

In the context of the T3 Memorization Assistant, each level or card contains a node number as its question, with the answer being the hash of the correct next node in the sequence. The problem lies in ensuring that these node answers are accurately hashed and correctly mapped to their respective levels within the application. This ensures that every time a user selects an option within the TKBA tree, the application can verify correctness by comparing hashes.


Describe the Solution You Would Like

The solution involves systematically generating cryptographic hashes for each correct node answer. These hashes serve as the "answers" for their respective levels (cards). The steps to achieve this are as follows:

  1. Node Answer Hashing:

    • Use Conventional parameter of Argon2 to securely hash answer.
    • The hash output will be stored in the encrypted database, linked to the corresponding level.
  2. Mapping to Levels:

    • Each level (card) will be assigned a unique node number as the question, with the correct answer being the pre-computed hash of the corresponding next node.
  3. Verification During User Interaction:

    • When a user selects a node option during TKBA tree roaming, the application will compare the hash of the chosen node with the correct answer stored for that level.
    • If the hashes match, the system registers the user's choice as correct, allowing them to proceed or submit a memorization score.

Additional Considerations

  • Security: Ensure that all hashes are securely stored in an encrypted database to prevent tampering or unauthorized access.
  • Scalability: The implementation should be scalable to accommodate an expanding TKBA tree and new levels without performance degradation.
  • Testing: Validate that the hash comparison logic works as expected by simulating various scenarios, including correct and incorrect node selections.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions