Skip to content

Conversation

@AlixANNERAUD
Copy link
Contributor

@AlixANNERAUD AlixANNERAUD commented Nov 30, 2025

This pull request introduces a new device abstraction for cryptographic hashing, integrates it into the authentication system, and updates the virtual file system and device registration across multiple platforms. The most significant changes include the addition of the device module, implementation of the HashDevice, and refactoring of authentication logic to use the new device-based hashing approach.

Device Abstraction and Implementation

  • Added a new device module (modules/device) with a hash submodule that defines the HashAlgorithm enum and control commands for hash operations (RESET, SET_ALGORITHM). [1] [2] [3]
  • Implemented HashDevice in drivers/shared/src/devices/hash.rs, supporting multiple hash algorithms and device operations (open, close, read, write, control).
  • Registered device as a workspace member and dependency in Cargo.toml files throughout the project. [1] [2] [3] [4]

Authentication System Refactor

  • Refactored password hashing in modules/authentication/src/hash.rs to use the new /devices/hasher device via async file operations, replacing direct hashing with the sha2 crate. [1] [2] [3]
  • Updated authentication and user management logic to use the new device-based hashing and salt generation, ensuring compatibility with the refactored API. [1] [2] [3] [4]
  • Expanded error handling in authentication to cover device-based hashing failures. [1] [2]

Device Registration and Platform Integration

  • Registered the new HashDevice as a character device at /devices/hasher in native, wasm, and testing environments, making it available for use in those platforms. [1] [2] [3]
  • Updated device module exports in drivers/shared/src/devices/mod.rs to include HashDevice.

@AlixANNERAUD AlixANNERAUD linked an issue Nov 30, 2025 that may be closed by this pull request
@AlixANNERAUD AlixANNERAUD merged commit ab76262 into main Nov 30, 2025
1 check failed
@AlixANNERAUD AlixANNERAUD deleted the 134-refactor-hashing-feature-as-a-character-device branch November 30, 2025 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor hashing feature as a character device

2 participants