草庐IT

CTF-Crypto

全部标签

go - crypto/sha1 不匹配 openssl 命令

我正在尝试计算sha1,但sha1与openssl命令不匹配。我在我的Macbook上计算一个空文件的哈希值:$touchtest.txt$opensslsha1-hextest.txtSHA1(test.txt)=da39a3ee5e6b4b0d3255bfef95601890afd80709和here是我的简单测试代码:packagemainimport"fmt"import"crypto/sha1"funcmain(){hash:=sha1.New()hash.Write([]byte{0x00})fmt.Printf("Hashgot%x,expectedda39a3ee5e6

go - crypto/sha1 不匹配 openssl 命令

我正在尝试计算sha1,但sha1与openssl命令不匹配。我在我的Macbook上计算一个空文件的哈希值:$touchtest.txt$opensslsha1-hextest.txtSHA1(test.txt)=da39a3ee5e6b4b0d3255bfef95601890afd80709和here是我的简单测试代码:packagemainimport"fmt"import"crypto/sha1"funcmain(){hash:=sha1.New()hash.Write([]byte{0x00})fmt.Printf("Hashgot%x,expectedda39a3ee5e6

bash - Istanbul-tools 安装错误 : github. com/ethereum/go-ethereum/crypto/bn256/cloudflare.gfpMul : relocation target runtime. support_bmi2 not defined

我正在尝试安装Istanbul-tools以运行IBFT以太坊网络,如本教程所示https://medium.com/getamis/istanbul-bft-ibft-c2758b7fe6ff我正在使用他们的makefile安装istanbul-toolsgobuild-v-o./build/bin/istanbul./cmd/istanbul在修复了一些最初的问题后,由于代码库已经一年没有更新了,然后我收到了以下错误:github.com/ethereum/go-ethereum/crypto/bn256/cloudflare.gfpMul:relocationtargetrunt

bash - Istanbul-tools 安装错误 : github. com/ethereum/go-ethereum/crypto/bn256/cloudflare.gfpMul : relocation target runtime. support_bmi2 not defined

我正在尝试安装Istanbul-tools以运行IBFT以太坊网络,如本教程所示https://medium.com/getamis/istanbul-bft-ibft-c2758b7fe6ff我正在使用他们的makefile安装istanbul-toolsgobuild-v-o./build/bin/istanbul./cmd/istanbul在修复了一些最初的问题后,由于代码库已经一年没有更新了,然后我收到了以下错误:github.com/ethereum/go-ethereum/crypto/bn256/cloudflare.gfpMul:relocationtargetrunt

Go SSH key 不适用于 crypto/ssh,但可以手动使用

我使用crypto/ssh包生成了SSHRSAkey对。但是,当我尝试通过Go中的脚本使用它时,出现错误:unabletoconnect:ssh:handshakefailed:ssh:unabletoauthenticate,attemptedmethods[nonepublickey],nosupportedmethodsremain当我通过CLI连接到远程设备时,它连接成功:ssh-i~/.ssh/test_key_1username@172.22.4.1我可能没有正确使用这个包吗?注意:私钥没有密码。packagemainimport("golang.org/x/crypto/

Go SSH key 不适用于 crypto/ssh,但可以手动使用

我使用crypto/ssh包生成了SSHRSAkey对。但是,当我尝试通过Go中的脚本使用它时,出现错误:unabletoconnect:ssh:handshakefailed:ssh:unabletoauthenticate,attemptedmethods[nonepublickey],nosupportedmethodsremain当我通过CLI连接到远程设备时,它连接成功:ssh-i~/.ssh/test_key_1username@172.22.4.1我可能没有正确使用这个包吗?注意:私钥没有密码。packagemainimport("golang.org/x/crypto/

go - 找不到 code.google.com/p/go.crypto/pbkdf2 文件?

这个问题在这里已经有了答案:packagecode.google.com/p/go.example/hello:exec:"hg":executablefilenotfoundin%PATH%.Howtogetremotegolangpackages?(1个回答)关闭去年。我想制作jujucharm-store服务器,但是当我尝试构建/安装时它给我这个错误:importscode.google.com/p/go.crypto/pbkdf2:exec:"hg":找不到可执行文件可以找到charm-store存储库here(github)。我还尝试使用以下命令获取包,但失败了:goget-

go - 找不到 code.google.com/p/go.crypto/pbkdf2 文件?

这个问题在这里已经有了答案:packagecode.google.com/p/go.example/hello:exec:"hg":executablefilenotfoundin%PATH%.Howtogetremotegolangpackages?(1个回答)关闭去年。我想制作jujucharm-store服务器,但是当我尝试构建/安装时它给我这个错误:importscode.google.com/p/go.crypto/pbkdf2:exec:"hg":找不到可执行文件可以找到charm-store存储库here(github)。我还尝试使用以下命令获取包,但失败了:goget-

encryption - 使用 crypto/aes lib 的 Golang 文件加密

我正在尝试使用Gocrypto/aes包加密文件。我到目前为止:funcencrypt(sourcestring,localdirstring)error{src:=filepath.Join("/home/bacula/cloud-backup/"+localdir,source)dst:=filepath.Join(src+".aes")fmt.Println(src)fmt.Println(dst)key:=[]byte("examplekey1234")iv:=[]byte(key)[:aes.BlockSize]aesBlockEncrypter,err:=aes.NewCi

encryption - 使用 crypto/aes lib 的 Golang 文件加密

我正在尝试使用Gocrypto/aes包加密文件。我到目前为止:funcencrypt(sourcestring,localdirstring)error{src:=filepath.Join("/home/bacula/cloud-backup/"+localdir,source)dst:=filepath.Join(src+".aes")fmt.Println(src)fmt.Println(dst)key:=[]byte("examplekey1234")iv:=[]byte(key)[:aes.BlockSize]aesBlockEncrypter,err:=aes.NewCi