Skip to content

SecretKey::to_bytes shouldn't be unsafe #8

@sosthene-nitrokey

Description

@sosthene-nitrokey

unsafe refers to memory safety, not generally "dangerous" APIs. I don't think it should be use for this kind of use cases. For example, neither the secrecy or untrusted use unsafe this way.

To warn against exporting the secret key, I'd recommend removing unsafe and renaming it to subtle_to_bytes or something similar.

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