Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

to do - allow struct to be encrypted and decrypted - use wireguard algo? #3

Open
EasilyBoredEngineer opened this issue Apr 19, 2024 · 3 comments

Comments

@EasilyBoredEngineer
Copy link
Owner

No description provided.

@EasilyBoredEngineer
Copy link
Owner Author

@EasilyBoredEngineer
Copy link
Owner Author

tiny encrypt?

    uint32_t v0 = v[0], v1 = v[1], sum = 0, delta = 0x9e3779b9;
    for (size_t i = 0; i < 32; ++i) {
        sum += delta;
        v0 += ((v1 << 4) + k[0]) ^ (v1 + sum) ^ ((v1 >> 5) + k[1]);
        v1 += ((v0 << 4) + k[2]) ^ (v0 + sum) ^ ((v0 >> 5) + k[3]);
    }
    v[0] = v0;
    v[1] = v1;
}

@EasilyBoredEngineer
Copy link
Owner Author

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

No branches or pull requests

1 participant