Skip to content

Instantly share code, notes, and snippets.

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しようとしたやつのメモ書き
package undirected
type Graph struct {
n, m int
head, next []int
src, dst []int
}
func NewGraph(n int) *Graph {
h := make([]int, n)

前提

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

ECDSA

  1. nonce k を生成
  2. R = kG = (rx, ry)を計算
  3. r = rxを得る
package main
import (
"encoding/gob"
"image/color"
"log"
"math"
"math/rand"
"os"
"os/exec"
package q99
import (
"errors"
"image/color"
"math"
"gonum.org/v1/plot"
"gonum.org/v1/plot/vg"
"gonum.org/v1/plot/vg/draw"
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"
package main
import (
"encoding/gob"
"fmt"
"log"
"math"
"math/rand"
"os"
"reflect"
package main
import (
"bufio"
"encoding/gob"
"io"
"log"
"os"
"strconv"
"strings"
package main
import (
"bufio"
"fmt"
"io"
"os"
"strconv"
"strings"
package main
import (
"bufio"
"io"
"math"
"os"
"strconv"
"strings"