Skip to content

Instantly share code, notes, and snippets.

View visvirial's full-sized avatar
💭
On my way

Vis Virial (a.k.a. びりある) visvirial

💭
On my way
View GitHub Profile
import fetch from 'cross-fetch';
import { PublicKey, Connection, Keypair, Transaction } from '@solana/web3.js';
import * as anchor from '@project-serum/anchor';
import { QuarrySDK } from '@quarryprotocol/quarry-sdk';
import { SolanaProvider } from "@saberhq/solana-contrib";
import { Token } from '@saberhq/token-utils';
export default class Wallet {
@visvirial
visvirial / g^(a^2) incomputability.md
Last active April 19, 2021 06:24
Proof of computing (g^a => g^(a^2)) is impossible under the DH assumption.

Statement

We prove that g^(a^2) cannot be computed efficiently from g^a under the Diffie-Hellman (DH) assumption. More rigorously, the following statement holds:

Let G be a cyclic group and g be a generater of G.
Given an oracle which can compute g^(a^2) from a given g^a for any integer a,
there exists a polynomial time algorithm which computes g^(xy) from g^x and g^y for any integers x and y.

Keybase proof

I hereby claim:

  • I am visvirial on github.
  • I am mhyuga (https://keybase.io/mhyuga) on keybase.
  • I have a public key whose fingerprint is 4486 9F12 2BE4 6ED5 336E 6F68 EB94 6CB1 1439 4B39

To claim this, I am signing this object:

私「びりある」は下記要領にて彼女を募集いたします。

ご興味のある方は、Twitter (@visvirial) でDMによりエントリーをお願いします。

【お相手の条件】

  • 必須要件
    • 生物学上の女性であること(男の娘不可)
  • 年齢:32歳以下
@visvirial
visvirial / bip-0341.ja.mediawiki
Last active September 17, 2020 15:46
BIP 341「Taproot: SegWit version 1 spending rules」日本語版

翻訳者注:この日本語訳は、2020年2月21日時点で https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki に公開されているものを底本としています。最新の情報については原文をご参照ください。


  BIP: 341
  Layer: Consensus (soft fork)
  Title: Taproot: SegWit version 1 spending rules
  Author&#58; Pieter Wuille <pieter.wuille@gmail.com>
          Jonas Nick <jonasd.nick@gmail.com>
          Anthony Towns <aj@erisian.com.au>

#!/usr/bin/env python3
#
# Dumb script to dump (some) of bcache status
# Copyright 2013 Darrick J. Wong. All rights reserved.
#
# This file is part of Bcache. Bcache is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT

What is this?

Title describes.

Convertion table

1 BTC is...

  • 1,000 mBTC
@visvirial
visvirial / Elliptic Curve Oblivious Transfer.md
Last active July 31, 2020 08:38
Oblivious transfer (OT) protocol that transfers points on an elliptic curve, instead of binary strings.

We propose an elliptic curve-version of oblivious transfer (ECOT) protocol which transfers points on an elliptic curve, instead of binary strings.

Oblivious transfer (OT)

Oblivious transfer (OT) is an important cryptographic primitive used in many cryptographic protocols as a building block. In the oblivious transfer protocols, the sender has messages m0 and m1 and the receiver wishes to retrieve one of the two messages

contract tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData); }
contract owned {
address public owner;
function owned() {
owner = msg.sender;
}