Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
*Backtrace*(2002-11-16)
[go: Go Back, main page]

書いてる人: 高橋カヲル | [mixi] | [PGP] | [TETRiS DS] | [portscout] | [RSS]

トップ «前の日記(2002-11-15) 最新 次の日記(2002-11-17)» 編集

*Backtrace*

1999|12|
2000|01|02|03|04|05|06|07|08|09|10|11|12|
2001|01|02|03|04|05|06|07|08|09|10|11|12|
2002|01|02|03|04|05|06|07|08|09|10|11|12|
2003|01|02|03|04|05|06|07|08|09|10|11|12|
2004|01|02|03|04|05|06|07|08|09|10|11|12|
2005|01|02|03|04|05|06|07|08|09|10|11|12|
2006|01|02|03|04|05|06|07|08|09|10|11|12|
2007|01|02|03|04|05|06|07|08|09|10|11|12|
2008|01|

2002-11-16

_ libc.so.1

Solaris も libc.so.1 が消えるとそれなりに痛い。 /usr/sbin/static/ と /sbin/ が使えるのはいいのだが、肝心の libc.so.1 がないのでお手上げ。

_ 上映会

office で上映会やってた。

_ RC4

stream cipher の理解が甘かった。

  • を読む。 RFC2628 には

    blocklen - data block length in bytes (value 1 must be used for stream cipher algorithms).

    ってあるから stream は 1byte 以下の単位なんじゃろうきっと。手元の本で

    • ECB (electronic codebook mode)
    • CBC (cipherblock chaining mode)
    • CFB (cipher feedback mode)
    • OFB (output feedback mode)

    の違いをきちんと理解するか。

  • _ [URL] $SUDO_USER

    $USER でなく $SUDO_USER を使えば sudo を叩いたユーザを取れることに気づく。ので、某所の Makefile を書き換える。

    update:
    	sudo cvs -d :ext:$$SUDO_USER@cvs.example.org:/export/cvsroot update -dP
    

    こういうことをしたかっただけ。諸事情で :local も :pserver も使えない。

    _ Tagmemics

    Randal の YAPC での発表資料。

    An Introduction to Linguistics for Perl Developers or "Wouldn't know a tagmeme if it bit me on the parse."

    [Mad-P音ゲー日記]

    _ rc4.el

    理解を深めるために実装してみた。

    (eval-when-compile
      (require 'cl))
    (defun rc4-swap-byte (array index1 index2)
      "Swap array[i] array[j] value."
      (let ((swapbyte))
        (setq swapbyte (aref array index1))
        (aset array index1 (aref array index2))
        (aset array index2 swapbyte))
      array)
    (defun rc4-init-key (keydata)
      (let ((state (make-vector 256 0)))
        (dotimes (i 256)
          (aset state i i))
        (let ((index1 0) (index2 0))
          (dotimes (i 256)
    	(setq index2
    	      (mod (+ (aref keydata index1) (aref state i) index2) 256))
    	(rc4-swap-byte state i index2)
    	(setq index1 (mod (1+ index1) (length keydata)))))
        (list 0 0 state)))
    (defun rc4 (input key)
      (let ((x (nth 0 key)) (y (nth 1 key)) (state (nth 2 key))
    	(output (make-vector (length input) 0)))
        (dotimes (i (length input))
          (setq x (mod (1+ x) 256))
          (setq y (mod (+ (aref state x) y) 256))
          (rc4-swap-byte state x y)
          (let (xorindex)
    	(setq xorindex (mod (+ (aref state x) (aref state y)) 256))
    	(aset output i
    	      (logxor (aref input i) (aref state xorindex)))))
        (setcar (cdr key) y)
        (setcar key x)
        output))
    

    /usr/src/crypto/openssl/crypto/rc4/rc4test.c から testcase をパクってくる。

    (equal
     (let ((key))
       (progn
         (setq key (rc4-init-key [#x01 #x23 #x45 #x67 #x89 #xab #xcd #xef]))
         (rc4-encrypt [#x01 #x23 #x45 #x67 #x89 #xab #xcd #xef] key)))
     [#x75 #xb7 #x87 #x80 #x99 #xe0 #xc5 #x96])
    
    お名前:
    E-mail:
    コメント:
    本日のリンク元
    その他のリンク元
    検索

    トップ «前の日記(2002-11-15) 最新 次の日記(2002-11-17)» 編集

    謎 queue & status

    Powered by 早起き生活
    [Powered by OpenBSD] [Powered by たん清] [やる気のないサイト] Valid HTML 4.01 Strict Page Rank Checker [VALID RSS!] RSS feed meter for http://triaez.kaisei.org/~kaoru/diary/