Compare commits

..

No commits in common. "v0.2.0-develop.32" and "v0.2.0-develop.31" have entirely different histories.

4 changed files with 3 additions and 19 deletions

View File

@ -1,10 +1,3 @@
# [0.2.0-develop.32](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.31...v0.2.0-develop.32) (2023-08-20)
### Features
* change deriveChildKey to hkdf sha256 and create deriveBlakeChildKey that hashes based on the initial blake3 route used by s5 ([7fefaf0](https://git.lumeweb.com/LumeWeb/libweb/commit/7fefaf0818417f1cc4ae0c9f360e5b08734d68f3))
# [0.2.0-develop.31](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.30...v0.2.0-develop.31) (2023-08-15)

4
npm-shrinkwrap.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@lumeweb/libweb",
"version": "0.2.0-develop.32",
"version": "0.2.0-develop.31",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@lumeweb/libweb",
"version": "0.2.0-develop.32",
"version": "0.2.0-develop.31",
"dependencies": {
"@lumeweb/community-portals": "^0.1.0-develop.6",
"@lumeweb/libportal": "0.2.0-develop.17",

View File

@ -1,6 +1,6 @@
{
"name": "@lumeweb/libweb",
"version": "0.2.0-develop.32",
"version": "0.2.0-develop.31",
"main": "lib/index.js",
"type": "module",
"repository": {

View File

@ -1,18 +1,9 @@
import { blake3 } from "@noble/hashes/blake3";
import { concatBytes } from "@noble/hashes/utils";
import { hkdf } from "@noble/hashes/hkdf";
import { sha256 } from "@noble/hashes/sha256";
export function deriveChildKey(
parentKey: Uint8Array,
tweak: string,
): Uint8Array {
return hkdf(sha256, parentKey, undefined, tweak, 32);
}
export function deriveBlakeChildKey(
parentKey: Uint8Array,
tweak: string,
): Uint8Array {
const tweakHash = blake3(tweak);