Skip to content

reference hashes and plaintext #1

Open

Description

@roycewilliams

Please provide some reference hashes and plaintext for password-storage use.

Do you have a suggested '$$'-style hash format, such as

$bscrypt$[workfactors]$[salt]$[hash]

?

Activity

  1. Sc00bz commented on Aug 10, 2022

    @Sc00bz
    Owner

    bscrypt/bscrypt.cpp

    Lines 624 to 638 in 1354e2a

    // Encode
    // $bscrypt$m=#,t=#,p=#$salt..................hash............................
    size_t offset = 11;
    memcpy(hash, "$bscrypt$m=", 11);
    offset += writeUint32(hash + offset, memoryKiB);
    memcpy(hash + offset, ",t=", 3);
    offset += 3;
    offset += writeUint32(hash + offset, iterations);
    memcpy(hash + offset, ",p=", 3);
    offset += 3;
    offset += writeUint32(hash + offset, parallelism);
    hash[offset++] = '$';
    offset += base64Encode(hash + offset, salt, 16 * sizeof(uint8_t), BASE64_ENCODE_FLAG_NO_PAD);
    offset += base64Encode(hash + offset, hashBytes, hashBytesSize, BASE64_ENCODE_FLAG_NO_PAD);
    hash[offset] = 0;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions