顯示具有 Diffie-Hellman 標籤的文章。 顯示所有文章
顯示具有 Diffie-Hellman 標籤的文章。 顯示所有文章

Free mib browser

Tcl-MIBBrowser is a free and open-source MIB Browser for Linux and Windows platforms.

Tcl-MIBBrowser is a front end for Net-SNMP, the UI is based on TCL / TK 8.6. It should be ported to other platforms. Currently I only build, and test on Linux and Windows.

The software use the following tcl's packages
net-snmp-tcl
sha1 (one of tcllib project)
inifile (one of tcllib project)
bigint (Split from bignum library)
treectrl

Features

  • SNMP v1, v2c ,v3
  • SNMPv3 Diffie-Hellman
  • Load MIB files
  • snmp dump/load OCTET data
  • Bookmark OID

Download






Diffie Hellman 參數檢查

在玩openssl的dh相關指令時,順手把之前玩過的snmpv3用的dh key拿來跑跑看
那把key的參數是
p=FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1
  29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD
  EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245
  E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED
  EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE65381
  FFFFFFFF FFFFFFFF"

g=2

先把它轉成der格式

package require asn
package require math::bignum

set p "
FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1
29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD
EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245
E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED
EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE65381
FFFFFFFF FFFFFFFF"

set p  [::math::bignum::fromstr 0x[string tolower [join [split $p " \n"] ""]]]

set key ""
append key [::asn::asnBigInteger $p]
append key [asn::asnInteger 2]
set key [::asn::asnSequence $key]

set fd [open dh_der w]
fconfigure $fd -translation binary
puts -nonewline $fd $key

snmpv3 Diffie-Hellman

在做cable modem測試時,需要用到snmpv3 Diffie-Hellman,為了能夠自動化,希望可以用net-snmp 來達成,可惜一直找不到使用Diffie-Hellman的方法,所以只好切開來做了

1. 用net-snmp取得public key
2 .利用程式(tcl)算出snmpv3的authentication key 和privacy key
3. 利用算出來的key使用snmpv3