-
BLS stands for
- Barreto-Lynn-Scott: BLS12, a Pairing Friendly Elliptic Curve.
- Boneh-Lynn-Shacham: A Signature Scheme.
-
Signature Aggregation
-
It is possible to verify
n
aggregate signatures on the same message with just2
pairings instead ofn+1
.
---Utility for keymap creation. | |
---@param lhs string | |
---@param rhs string|function | |
---@param opts string|table | |
---@param mode? string|string[] | |
local function keymap(lhs, rhs, opts, mode) | |
opts = type(opts) == 'string' and { desc = opts } | |
or vim.tbl_extend('error', opts --[[@as table]], { buffer = bufnr }) | |
mode = mode or 'n' | |
vim.keymap.set(mode, lhs, rhs, opts) |
const { toBN } = require('web3-utils'); | |
function findBucket(iterations) { | |
const selectors = [ | |
0x12345678, | |
0x11223344, | |
0xaabbccdd, | |
0xabcdefff, | |
0xabbcccdd, | |
0xbbbbbbbb, |
any
: magic, ill-behaved type that acts like a combination ofnever
(the proper [bottom type]) andunknown
(the proper [top type])- Anything except
never
is assignable toany
, andany
is assignable to anything at all. - Identities:
any & AnyTypeExpression = any
,any | AnyTypeExpression = any
- Key TypeScript feature that allows for [gradual typing].
- Anything except
unknown
: proper, well-behaved [top type]- Anything at all is assignable to
unknown
.unknown
is only assignable to itself (unknown
) andany
. - Identities:
unknown & AnyTypeExpression = AnyTypeExpression
,unknown | AnyTypeExpression = unknown
- Anything at all is assignable to
- Prefer over
any
whenever possible. Anywhere in well-typed code you're tempted to useany
, you probably wantunknown
.
#!/bin/bash | |
set -eu | |
die() { | |
echo "$1" >&2 | |
exit 1 | |
} |
[dependencies] | |
rust-crypto = "0.2" |
# /etc/udev/rules.d/20-bt-auto-enable-a2dp.rules | |
# hxss | |
SUBSYSTEM=="bluetooth", ACTION=="add", RUN+="/home/hxss/.config/scripts/xorg/bt-auto-enable-a2dp.sh" |
There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.
Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes (beware, through Google) for you to use on your favorite authenticator.
His method is to extract the secret keys using Authy's Google Chrome app via Developer Tools. If this was not possible, I guess people would be reverse engineering the Android app or something like that. But when I tried that code, nothing appeared on the screen. My gues
#!/bin/bash | |
currentvol=`dbus-send --system --type=method_call --print-reply=literal --dest=org.bluez /org/bluez/hci0/dev_94_01_C2_4B_58_9D/fd2 org.freedesktop.DBus.Properties.Get string:org.bluez.MediaTransport1 string:Volume | cut -d" " -f 12` | |
increment() { | |
newvol=$(($currentvol + 5)) | |
dbus-send --system --type=method_call --print-reply=literal --dest=org.bluez /org/bluez/hci0/dev_94_01_C2_4B_58_9D/fd2 org.freedesktop.DBus.Properties.Set string:org.bluez.MediaTransport1 string:Volume variant:uint16:$newvol | |
} | |
decrement() { | |
newvol=$(($currentvol - 5)) |
pragma solidity ^0.4.4; | |
contract X{ | |
string junk; | |
function y() returns(string){ | |
//Uncomment the 'junk' below to make gas-measurements | |
//junk="0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF012345 |