Compare commits
3 Commits
v0.2.0-dev
...
v0.2.0-dev
Author | SHA1 | Date |
---|---|---|
semantic-release-bot | 9b7c8f1e82 | |
Derrick Hammer | 63e73ced76 | |
Derrick Hammer | 7fefaf0818 |
|
@ -1,3 +1,10 @@
|
|||
# [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)
|
||||
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@lumeweb/libweb",
|
||||
"version": "0.2.0-develop.31",
|
||||
"version": "0.2.0-develop.32",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@lumeweb/libweb",
|
||||
"version": "0.2.0-develop.31",
|
||||
"version": "0.2.0-develop.32",
|
||||
"dependencies": {
|
||||
"@lumeweb/community-portals": "^0.1.0-develop.6",
|
||||
"@lumeweb/libportal": "0.2.0-develop.17",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@lumeweb/libweb",
|
||||
"version": "0.2.0-develop.31",
|
||||
"version": "0.2.0-develop.32",
|
||||
"main": "lib/index.js",
|
||||
"type": "module",
|
||||
"repository": {
|
||||
|
|
|
@ -1,9 +1,18 @@
|
|||
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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue