Skip to content

Instantly share code, notes, and snippets.

View dfs_test.go
package undirected
import (
"reflect"
"testing"
)
func TestNewGraph(t *testing.T) {
type args struct {
n int
@cipepser
cipepser / dfs.go
Created May 6, 2018 04:15
dfsでcycle detectしようとしたやつのメモ書き
View dfs.go
package undirected
type Graph struct {
n, m int
head, next []int
src, dst []int
}
func NewGraph(n int) *Graph {
h := make([]int, n)
View Scriptless Scrips with ECDSAのメモ.md

前提

  • ハッシュ関数H、生成元Gは合意済み
  • m' = LSB(H(m))も合意済み
  • x, x1, x2: 秘密鍵
  • P1, P2の公開鍵は、署名検証で使うため省略

ECDSA

  1. nonce k を生成
  2. R = kG = (rx, ry)を計算
  3. r = rxを得る
View q99.go
package main
import (
"encoding/gob"
"image/color"
"log"
"math"
"math/rand"
"os"
"os/exec"
View q99Vis.go
package q99
import (
"errors"
"image/color"
"math"
"gonum.org/v1/plot"
"gonum.org/v1/plot/vg"
"gonum.org/v1/plot/vg/draw"
View q98.go
package main
import (
"math"
"github.com/cipepser/goClustering/vis"
"github.com/cipepser/goClustering/ward"
"gonum.org/v1/plot"
"gonum.org/v1/plot/vg"
"gonum.org/v1/plot/vg/draw"
View q97.go
package main
import (
"encoding/gob"
"fmt"
"log"
"math"
"math/rand"
"os"
"reflect"
View q96.go
package main
import (
"bufio"
"encoding/gob"
"io"
"log"
"os"
"strconv"
"strings"
View q95.go
package main
import (
"bufio"
"fmt"
"io"
"os"
"strconv"
"strings"
View q94.go
package main
import (
"bufio"
"io"
"math"
"os"
"strconv"
"strings"