Git Product home page Git Product logo

blake2-d's Introduction

dd86k

Hi there, I'm dd!

I'm interested in software engineering, system administration, telecommunications, and technical documentation.

My main programming language is the D programming language. I also know a good amount of C, C#, PHP, and JavaScript.

Available on: GitHub, Gitlab, and Codeberg.

A more complete portfolio is available online.

Active Projects

Project Links Description
alicedbg GitHub, GitLab, Codeberg Debugger toolkit and shell
aliceserver GitHub, GitLab, Codeberg Debugger server implementing DAP
ddhx GitHub, GitLab Hex viewer
ddgst GitHub, GitLab Hashing multithreaded utility
binco GitHub Binary-text encoder/decoder
sha3-d GitHub Keccak-f[1600,24] (SHA-3) implementation
blake2-d GitHub BLAKE2 implementation (s and b variants)
lateterm GitHub, GitLab WordPress "DOS" theme
npp_vs2012 GitHub Notepad++ "VS2012" theme

blake2-d's People

Contributors

dd86k avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jefferyq7

blake2-d's Issues

Add key() function to WrapperDigest

The Digest API does not support keyed algorithms. Thankfully, WrapperDigest (OOP API) is a class template and I hope to inherit it to add a key function already found in the structure template (Template API).

Key can still be given to template structure anyway when initiating the class template.

This adds the key function to the Digest OOP API.

Concept

class WrapperDigestKeyed(T) if (isDigest!T) : WrapperDigest!T
{
    void key(ubyte[] input)
    {
        _digest.key(input);
    }
}

Redo structure template

Currently, because of the (rather silly) use of an enum for a structure template parameter, I cannot make inner_t types available outside the scope for compile-time keyed input.

The new idea would be:

  • struct BLAKE2b(uint digestSize = 512, ulong[8] key = null) defining inner parameters
  • struct BLAKE2s(uint digestSize = 256, uint[8] key = null) defining inner parameters
  • template BLAKE2Impl(T, ...) called from either (and possible p variants)

I think you get the idea. I'll do this on my free time.

Fix HMAC usage

While the Digest API uses std.digest.hmac.HMAC for HMAC, which adds a secret hashed key using the template API, the way BLAKE2 does is just... Weird.

At initiation:

  • Parameter block index 0 byte 1 (little-endian) sets key size in bytes.
  • Key is XOR'd with state alongside IV (ulong for b, uint for s, see the inner_t alias).

Which is simply not possible with the HMAC structure template. Unless there's a hack I don't know of.

Add support for core.simd, intel-intrinsics, or inlined assembly

Waiting on: #2

Options:

  1. core.simd -- Supported everywhere, I think.
  2. intel-intrinsics DUB package -- Somewhat supports all compilers.
  3. Inlined assembly -- If all fails, at least x86 users would benefit. But limited to AVX/AV2 and not SSE* at best (because DMD).

Versions: Blake2dUseSIMD or Blake2dUseIntrinsics (user will have to manually assign version)

Include version string

I should be including the version number as a string (enum) for diagnostic and printing purposes.

Also because I don't have to manually type it in version pages and the like.

Like

enum BLAKE2D_VERSION_STRING = "0.1.1";

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.