Compare commits
No commits in common. "v0.2.0-develop.32" and "v0.2.0-develop.31" have entirely different histories.
v0.2.0-dev
...
v0.2.0-dev
|
@ -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)
|
# [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",
|
"name": "@lumeweb/libweb",
|
||||||
"version": "0.2.0-develop.32",
|
"version": "0.2.0-develop.31",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@lumeweb/libweb",
|
"name": "@lumeweb/libweb",
|
||||||
"version": "0.2.0-develop.32",
|
"version": "0.2.0-develop.31",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@lumeweb/community-portals": "^0.1.0-develop.6",
|
"@lumeweb/community-portals": "^0.1.0-develop.6",
|
||||||
"@lumeweb/libportal": "0.2.0-develop.17",
|
"@lumeweb/libportal": "0.2.0-develop.17",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@lumeweb/libweb",
|
"name": "@lumeweb/libweb",
|
||||||
"version": "0.2.0-develop.32",
|
"version": "0.2.0-develop.31",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
@ -1,18 +1,9 @@
|
||||||
import { blake3 } from "@noble/hashes/blake3";
|
import { blake3 } from "@noble/hashes/blake3";
|
||||||
import { concatBytes } from "@noble/hashes/utils";
|
import { concatBytes } from "@noble/hashes/utils";
|
||||||
import { hkdf } from "@noble/hashes/hkdf";
|
|
||||||
import { sha256 } from "@noble/hashes/sha256";
|
|
||||||
|
|
||||||
export function deriveChildKey(
|
export function deriveChildKey(
|
||||||
parentKey: Uint8Array,
|
parentKey: Uint8Array,
|
||||||
tweak: string,
|
tweak: string,
|
||||||
): Uint8Array {
|
|
||||||
return hkdf(sha256, parentKey, undefined, tweak, 32);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function deriveBlakeChildKey(
|
|
||||||
parentKey: Uint8Array,
|
|
||||||
tweak: string,
|
|
||||||
): Uint8Array {
|
): Uint8Array {
|
||||||
const tweakHash = blake3(tweak);
|
const tweakHash = blake3(tweak);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue