6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Nov 14, 2024 6:13 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sat Jan 22, 2005 5:59 pm 
Offline

Joined: Thu May 08, 2003 6:27 pm
Posts: 4
The codes below is algorithm of BlowFish (a cipher algorithm).
My code is compiled under "6502 Macro Assembler&Simulator".
To adapt to other compilers or platforms , several modifies is needed.

Code:

   .ORG 0
   jmp main
OrgS1=OrgSbox

OrgS2=OrgSbox+256*4
OrgS3=OrgSbox+256*4*2
OrgS4=OrgSbox+256*4*3
OrgSend=OrgSbox+256*4*4

S1=Sbox
S2=S1+256*4
S3=S1+256*4*2
S4=S1+256*4*3
Send=S1+256*4*4

Pboxa=Pbox+4
Pboxb=Pbox+16*4

MAX_KEYLEN=56
MIN_KEYLEN=5
;======================================================
;vars
DataL    .DB 0,0,0,0
DataR    .DB 0,0,0,0

OutL    .DB 0,0,0,0
OutR    .DB 0,0,0,0

KeyLen    .DB 0
KeyPtr   .DB 0,0
KeyStr   .DB "TESTKEY"
   
SboxPtr   .DB 0,0

;SPtr1   .DB 0,0   
;SPtr2   .DB 0,0   
;SPtr3   .DB 0,0   
;SPtr4   .DB 0,0   
;SPtrEnd .DB 0,0

TmpDW0   .DB 0,0,0,0
TmpDW1   .DB 0,0,0,0
TmpDW2   .DB 0,0,0,0
TmpDW3   .DB 0,0,0,0
TmpDW4   .DB 0,0,0,0
TmpDW5   .DB 0,0,0,0
TmpDW6   .DB 0,0,0,0
TmpDW7   .DB 0,0,0,0
TmpDW8   .DB 0,0,0,0
TmpDW9   .DB 0,0,0,0

   .ORG $1000
Pbox   .DCB 18*4,0
Sbox   .DCB 4*4*256,0
;======================================================
xchgBYTE   .MACRO a,b
      LDA a
      LDX b
      STA b
      STX a
   .ENDM
xchgWORD   .MACRO a,b
      xchgBYTE a,b
      xchgBYTE a+1,b+1
   .ENDM
xchgDWORD   .MACRO a,b
      xchgWORD a,b
      xchgWORD a+2,b+2
   .ENDM

memcpy256B   .MACRO src,dest,len;len=0 mean 1byte
      LDY #len
.cpynextB   LDA src,y
      STA dest,y
      DEY
      CPY #$FF
      BNE .cpynextB
   .ENDM
memcpy1KB   .MACRO src,dest
      memcpy256B src,dest,$FF
      memcpy256B src+256,dest+256,$FF
      memcpy256B src+256*2,dest+256*2,$FF
      memcpy256B src+256*3,dest+256*3,$FF
   .ENDM
   
setBYTE      .MACRO var,val
      LDA #val
      STA var
   .ENDM

setWORD      .MACRO var,val
      setBYTE var,<val
      setBYTE var+1,>val
   .ENDM

setDWORD   .MACRO var,valH,valL
      setWORD var,valL
      setWORD var+2,valH
   .ENDM

xorBYTE      .MACRO a,b,c
      LDA a
      EOR b
      STA c
   .ENDM
xorWORD    .MACRO a,b,c
      xorBYTE   a,b,c
      xorBYTE   a+1,b+1,c+1
   .ENDM
   
xorDWORD    .MACRO a,b,c
      xorWORD   a,b,c
      xorWORD   a+2,b+2,c+2
   .ENDM

loadBYTE   .MACRO a,ptr
      LDY #0
      LDA (ptr),y
      STA a
   .ENDM
loadWORD   .MACRO a,ptr
      LDY #0
      LDA (ptr),y
      STA a
      INY
      LDA (ptr),y
      STA a+1
   .ENDM
loadDWORD   .MACRO a,ptr
      LDY #0
      LDA (ptr),y
      STA a
      INY
      LDA (ptr),y
      STA a+1
      INY
      LDA (ptr),y
      STA a+2
      INY
      LDA (ptr),y
      STA a+3
   .ENDM
   
storBYTE   .MACRO a,ptr
      LDY #0
      LDA a
      STA (ptr),y
   .ENDM
storWORD   .MACRO a,ptr
      LDY #0
      LDA a
      STA (ptr),y
      INY
      LDA a+1
      STA (ptr),y
   .ENDM
storDWORD   .MACRO a,ptr
      LDY #0
      LDA a
      STA (ptr),y
      INY
      LDA a+1
      STA (ptr),y
      INY
      LDA a+2
      STA (ptr),y
      INY
      LDA a+3
      STA (ptr),y
   .ENDM
   
;MinusBYTE   .MACRO

addBYTE      .MACRO a,b,c
      LDA a
      ADC b
      STA c
   .ENDM
addWORD      .MACRO a,b,c
      addBYTE a,b,c
      addBYTE a+1,b+1,c+1
   .ENDM
addDWORD   .MACRO a,b,c
      addWORD a,b,c
      addWORD a+2,b+2,c+2
   .ENDM
   
;======================================================
InitBF
   ;initialize key

   
   ;cpy sbox()
   memcpy1KB OrgS1,S1
   memcpy1KB OrgS2,S2
   memcpy1KB OrgS3,S3
   memcpy1KB OrgS4,S4
   
   ;intialize pbox step1
   LDX #0
   LDY #3
   
L2      LDA KeyStr,x
      EOR OrgPbox,y
      STA Pbox,y
      INX
      CPX KeyLen
      BNE L1
         LDX #0
L1   DEY
   TYA
   AND #3
   CMP #3
   BNE L2
   CPY #$43
   BEQ L0
   TYA
   CLC
   ADC #8
   TAY
   JMP L2         
L0   
   ;intialize pbox step2
   setBYTE  TmpDW5,0
   setDWORD DataL,0,0
   setDWORD DataR,0,0
   NOP
L4   JSR BF_Encrypt
   
      LDY #0
      LDX TmpDW5
L5      LDA DataL,y
      STA Pbox,x
      INY
      INX
      CPY #8
      BNE L5         
   STX TmpDW5
   CPX #72
   BNE L4
   NOP
   ;initial sbox
   setWORD  TmpDW5,Sbox

L6   JSR BF_Encrypt

      LDY #7
L7      LDA DataL,y
      STA (TmpDW5),y
      DEY
      CPY #$FF
      BNE L7
   CLC
   LDA TmpDW5
   ADC #8
   STA TmpDW5
   BCC L8
      INC TmpDW5+1
L8   LDA TmpDW5+1
   CMP #>Send
   BNE L6
   LDA TmpDW5
   CMP #<Send
   BNE L6
   
   
   RTS
   
;======================================================
;private MACRO
LoadS   .MACRO Snum,address,tag   ;use TmpDW2
      setWORD TmpDW2,0
      LDA address
      CLC
      ASL
      ROL TmpDW2+1
      ASL
      ROL TmpDW2+1
      ADC #<Snum
      STA TmpDW2
      LDA TmpDW2+1
      ADC #>Snum
      STA TmpDW2+1
      loadDWORD tag,TmpDW2
   .ENDM
   
;======================================================
BF_Encrypt

   setWORD TmpDW0,Pbox
   
L9   ;cycle
      loadDWORD TmpDW1,TmpDW0
      xorDWORD DataL,TmpDW1,DataL
      
      LoadS S1,DataL+3,TmpDW3
      
      LoadS S2,DataL+2,TmpDW4
      CLC
      addDWORD TmpDW3,TmpDW4,TmpDW3
      
      LoadS S3,DataL+1,TmpDW4            
      xorDWORD TmpDW3,TmpDW4,TmpDW3

      LoadS S4,DataL,TmpDW4   
      CLC
      addDWORD TmpDW3,TmpDW4,TmpDW3
            
      xorDWORD DataR,TmpDW3,DataR
      xchgDWORD DataL,DataR
      
   CLC
   LDA TmpDW0
   ADC #4
   STA TmpDW0
   BCC L10   
      INC TmpDW0+1
L10   LDA TmpDW0+1
   CMP #>Pboxb
   BEQ TL1
      JMP L9
TL1   LDA TmpDW0
   CMP #<Pboxb
   BEQ TL2
      JMP L9
TL2
   
   xchgDWORD DataL,DataR
   xorDWORD DataR,Pbox+16*4,DataR
   xorDWORD DataL,Pbox+17*4,DataL
   
   RTS
   
;======================================================
BF_Decrypt
   
   setWORD TmpDW0,Pbox+17*4
   
L11   ;cycle
      loadDWORD TmpDW1,TmpDW0
      xorDWORD DataL,TmpDW1,DataL
      
      LoadS S1,DataL+3,TmpDW3
      
      LoadS S2,DataL+2,TmpDW4
      CLC
      addDWORD TmpDW3,TmpDW4,TmpDW3
      
      LoadS S3,DataL+1,TmpDW4            
      xorDWORD TmpDW3,TmpDW4,TmpDW3

      LoadS S4,DataL,TmpDW4   
      CLC
      addDWORD TmpDW3,TmpDW4,TmpDW3
            
      xorDWORD DataR,TmpDW3,DataR
      xchgDWORD DataL,DataR
   SEC
   LDA TmpDW0
   SBC #4
   STA TmpDW0
   BCS L12   
      DEC TmpDW0+1
L12   LDA TmpDW0+1
   CMP #>Pboxa
   BEQ TL3
      JMP L11
TL3
   LDA TmpDW0
   CMP #<Pboxa
   BEQ TL4
      JMP L11
TL4
   
   xchgDWORD DataL,DataR
   xorDWORD DataR,Pbox+4,DataR
   xorDWORD DataL,Pbox,DataL
   
   RTS   
;======================================================
main   NOP
   setWORD KeyPtr,KeyStr
   setBYTE KeyLen,7
   
   JSR InitBF
   NOP
   setDWORD DataL,0,0
   setDWORD DataR,0,0
   
   setDWORD DataL,0,1
   setDWORD DataR,0,2
   JSR BF_Encrypt
   NOP
   JSR BF_Decrypt
   NOP
   RTS

;======================================================
;Data Segment
OrgPbox
   .db $88, $6A, $3F, $24, $D3, $08, $A3, $85, $2E, $8A, $19, $13, $44, $73, $70, $03
   .db $22, $38, $09, $A4, $D0, $31, $9F, $29, $98, $FA, $2E, $08, $89, $6C, $4E, $EC
   .db $E6, $21, $28, $45, $77, $13, $D0, $38, $CF, $66, $54, $BE, $6C, $0C, $E9, $34
   .db $B7, $29, $AC, $C0, $DD, $50, $7C, $C9, $B5, $D5, $84, $3F, $17, $09, $47, $B5
   .DB $D9, $D5, $16, $92, $1B, $FB, $79, $89

OrgSbox
   .db $A6, $0B, $31, $D1, $AC, $B5, $DF, $98, $DB, $72, $FD, $2F, $B7, $DF, $1A, $D0
   .db $ED, $AF, $E1, $B8, $96, $7E, $26, $6A, $45, $90, $7C, $BA, $99, $7F, $2C, $F1
   .db $47, $99, $A1, $24, $F7, $6C, $91, $B3, $E2, $F2, $01, $08, $16, $FC, $8E, $85
   .db $D8, $20, $69, $63, $69, $4E, $57, $71, $A3, $FE, $58, $A4, $7E, $3D, $93, $F4
   .db $8F, $74, $95, $0D, $58, $B6, $8E, $72, $58, $CD, $8B, $71, $EE, $4A, $15, $82
   .db $1D, $A4, $54, $7B, $B5, $59, $5A, $C2, $39, $D5, $30, $9C, $13, $60, $F2, $2A
   .db $23, $B0, $D1, $C5, $F0, $85, $60, $28, $18, $79, $41, $CA, $EF, $38, $DB, $B8
   .db $B0, $DC, $79, $8E, $0E, $18, $3A, $60, $8B, $0E, $9E, $6C, $3E, $8A, $1E, $B0
   .db $C1, $77, $15, $D7, $27, $4B, $31, $BD, $DA, $2F, $AF, $78, $60, $5C, $60, $55
   .db $F3, $25, $55, $E6, $94, $AB, $55, $AA, $62, $98, $48, $57, $40, $14, $E8, $63
   .db $6A, $39, $CA, $55, $B6, $10, $AB, $2A, $34, $5C, $CC, $B4, $CE, $E8, $41, $11
   .db $AF, $86, $54, $A1, $93, $E9, $72, $7C, $11, $14, $EE, $B3, $2A, $BC, $6F, $63
   .db $5D, $C5, $A9, $2B, $F6, $31, $18, $74, $16, $3E, $5C, $CE, $1E, $93, $87, $9B
   .db $33, $BA, $D6, $AF, $5C, $CF, $24, $6C, $81, $53, $32, $7A, $77, $86, $95, $28
   .db $98, $48, $8F, $3B, $AF, $B9, $4B, $6B, $1B, $E8, $BF, $C4, $93, $21, $28, $66
   .db $CC, $09, $D8, $61, $91, $A9, $21, $FB, $60, $AC, $7C, $48, $32, $80, $EC, $5D
   .db $5D, $5D, $84, $EF, $B1, $75, $85, $E9, $02, $23, $26, $DC, $88, $1B, $65, $EB
   .db $81, $3E, $89, $23, $C5, $AC, $96, $D3, $F3, $6F, $6D, $0F, $39, $42, $F4, $83
   .db $82, $44, $0B, $2E, $04, $20, $84, $A4, $4A, $F0, $C8, $69, $5E, $9B, $1F, $9E
   .db $42, $68, $C6, $21, $9A, $6C, $E9, $F6, $61, $9C, $0C, $67, $F0, $88, $D3, $AB
   .db $D2, $A0, $51, $6A, $68, $2F, $54, $D8, $28, $A7, $0F, $96, $A3, $33, $51, $AB
   .db $6C, $0B, $EF, $6E, $E4, $3B, $7A, $13, $50, $F0, $3B, $BA, $98, $2A, $FB, $7E
   .db $1D, $65, $F1, $A1, $76, $01, $AF, $39, $3E, $59, $CA, $66, $88, $0E, $43, $82
   .db $19, $86, $EE, $8C, $B4, $9F, $6F, $45, $C3, $A5, $84, $7D, $BE, $5E, $8B, $3B
   .db $D8, $75, $6F, $E0, $73, $20, $C1, $85, $9F, $44, $1A, $40, $A6, $6A, $C1, $56
   .db $62, $AA, $D3, $4E, $06, $77, $3F, $36, $72, $DF, $FE, $1B, $3D, $02, $9B, $42
   .db $24, $D7, $D0, $37, $48, $12, $0A, $D0, $D3, $EA, $0F, $DB, $9B, $C0, $F1, $49
   .db $C9, $72, $53, $07, $7B, $1B, $99, $80, $D8, $79, $D4, $25, $F7, $DE, $E8, $F6
   .db $1A, $50, $FE, $E3, $3B, $4C, $79, $B6, $BD, $E0, $6C, $97, $BA, $06, $C0, $04
   .db $B6, $4F, $A9, $C1, $C4, $60, $9F, $40, $C2, $9E, $5C, $5E, $63, $24, $6A, $19
   .db $AF, $6F, $FB, $68, $B5, $53, $6C, $3E, $EB, $B2, $39, $13, $6F, $EC, $52, $3B
   .db $1F, $51, $FC, $6D, $2C, $95, $30, $9B, $44, $45, $81, $CC, $09, $BD, $5E, $AF
   .db $04, $D0, $E3, $BE, $FD, $4A, $33, $DE, $07, $28, $0F, $66, $B3, $4B, $2E, $19
   .db $57, $A8, $CB, $C0, $0F, $74, $C8, $45, $39, $5F, $0B, $D2, $DB, $FB, $D3, $B9
   .db $BD, $C0, $79, $55, $0A, $32, $60, $1A, $C6, $00, $A1, $D6, $79, $72, $2C, $40
   .db $FE, $25, $9F, $67, $CC, $A3, $1F, $FB, $F8, $E9, $A5, $8E, $F8, $22, $32, $DB
   .db $DF, $16, $75, $3C, $15, $6B, $61, $FD, $C8, $1E, $50, $2F, $AB, $52, $05, $AD
   .db $FA, $B5, $3D, $32, $60, $87, $23, $FD, $48, $7B, $31, $53, $82, $DF, $00, $3E
   .db $BB, $57, $5C, $9E, $A0, $8C, $6F, $CA, $2E, $56, $87, $1A, $DB, $69, $17, $DF
   .db $F6, $A8, $42, $D5, $C3, $FF, $7E, $28, $C6, $32, $67, $AC, $73, $55, $4F, $8C
   .db $B0, $27, $5B, $69, $C8, $58, $CA, $BB, $5D, $A3, $FF, $E1, $A0, $11, $F0, $B8
   .db $98, $3D, $FA, $10, $B8, $83, $21, $FD, $6C, $B5, $FC, $4A, $5B, $D3, $D1, $2D
   .db $79, $E4, $53, $9A, $65, $45, $F8, $B6, $BC, $49, $8E, $D2, $90, $97, $FB, $4B
   .db $DA, $F2, $DD, $E1, $33, $7E, $CB, $A4, $41, $13, $FB, $62, $E8, $C6, $E4, $CE
   .db $DA, $CA, $20, $EF, $01, $4C, $77, $36, $FE, $9E, $7E, $D0, $B4, $1F, $F1, $2B
   .db $4D, $DA, $DB, $95, $98, $91, $90, $AE, $71, $8E, $AD, $EA, $A0, $D5, $93, $6B
   .db $D0, $D1, $8E, $D0, $E0, $25, $C7, $AF, $2F, $5B, $3C, $8E, $B7, $94, $75, $8E
   .db $FB, $E2, $F6, $8F, $64, $2B, $12, $F2, $12, $B8, $88, $88, $1C, $F0, $0D, $90
   .db $A0, $5E, $AD, $4F, $1C, $C3, $8F, $68, $91, $F1, $CF, $D1, $AD, $C1, $A8, $B3
   .db $18, $22, $2F, $2F, $77, $17, $0E, $BE, $FE, $2D, $75, $EA, $A1, $1F, $02, $8B
   .db $0F, $CC, $A0, $E5, $E8, $74, $6F, $B5, $D6, $F3, $AC, $18, $99, $E2, $89, $CE
   .db $E0, $4F, $A8, $B4, $B7, $E0, $13, $FD, $81, $3B, $C4, $7C, $D9, $A8, $AD, $D2
   .db $66, $A2, $5F, $16, $05, $77, $95, $80, $14, $73, $CC, $93, $77, $14, $1A, $21
   .db $65, $20, $AD, $E6, $86, $FA, $B5, $77, $F5, $42, $54, $C7, $CF, $35, $9D, $FB
   .db $0C, $AF, $CD, $EB, $A0, $89, $3E, $7B, $D3, $1B, $41, $D6, $49, $7E, $1E, $AE
   .db $2D, $0E, $25, $00, $5E, $B3, $71, $20, $BB, $00, $68, $22, $AF, $E0, $B8, $57
   .db $9B, $36, $64, $24, $1E, $B9, $09, $F0, $1D, $91, $63, $55, $AA, $A6, $DF, $59
   .db $89, $43, $C1, $78, $7F, $53, $5A, $D9, $A2, $5B, $7D, $20, $C5, $B9, $E5, $02
   .db $76, $03, $26, $83, $A9, $CF, $95, $62, $68, $19, $C8, $11, $41, $4A, $73, $4E
   .db $CA, $2D, $47, $B3, $4A, $A9, $14, $7B, $52, $00, $51, $1B, $15, $29, $53, $9A
   .db $3F, $57, $0F, $D6, $E4, $C6, $9B, $BC, $76, $A4, $60, $2B, $00, $74, $E6, $81
   .db $B5, $6F, $BA, $08, $1F, $E9, $1B, $57, $6B, $EC, $96, $F2, $15, $D9, $0D, $2A
   .db $21, $65, $63, $B6, $B6, $F9, $B9, $E7, $2E, $05, $34, $FF, $64, $56, $85, $C5
   .db $5D, $2D, $B0, $53, $A1, $8F, $9F, $A9, $99, $47, $BA, $08, $6A, $07, $85, $6E
   .db $E9, $70, $7A, $4B, $44, $29, $B3, $B5, $2E, $09, $75, $DB, $23, $26, $19, $C4
   .db $B0, $A6, $6E, $AD, $7D, $DF, $A7, $49, $B8, $60, $EE, $9C, $66, $B2, $ED, $8F
   .db $71, $8C, $AA, $EC, $FF, $17, $9A, $69, $6C, $52, $64, $56, $E1, $9E, $B1, $C2
   .db $A5, $02, $36, $19, $29, $4C, $09, $75, $40, $13, $59, $A0, $3E, $3A, $18, $E4
   .db $9A, $98, $54, $3F, $65, $9D, $42, $5B, $D6, $E4, $8F, $6B, $D6, $3F, $F7, $99
   .db $07, $9C, $D2, $A1, $F5, $30, $E8, $EF, $E6, $38, $2D, $4D, $C1, $5D, $25, $F0
   .db $86, $20, $DD, $4C, $26, $EB, $70, $84, $C6, $E9, $82, $63, $5E, $CC, $1E, $02
   .db $3F, $6B, $68, $09, $C9, $EF, $BA, $3E, $14, $18, $97, $3C, $A1, $70, $6A, $6B
   .db $84, $35, $7F, $68, $86, $E2, $A0, $52, $05, $53, $9C, $B7, $37, $07, $50, $AA
   .db $1C, $84, $07, $3E, $5C, $AE, $DE, $7F, $EC, $44, $7D, $8E, $B8, $F2, $16, $57
   .db $37, $DA, $3A, $B0, $0D, $0C, $50, $F0, $04, $1F, $1C, $F0, $FF, $B3, $00, $02
   .db $1A, $F5, $0C, $AE, $B2, $74, $B5, $3C, $58, $7A, $83, $25, $BD, $21, $09, $DC
   .db $F9, $13, $91, $D1, $F6, $2F, $A9, $7C, $73, $47, $32, $94, $01, $47, $F5, $22
   .db $81, $E5, $E5, $3A, $DC, $DA, $C2, $37, $34, $76, $B5, $C8, $A7, $DD, $F3, $9A
   .db $46, $61, $44, $A9, $0E, $03, $D0, $0F, $3E, $C7, $C8, $EC, $41, $1E, $75, $A4
   .db $99, $CD, $38, $E2, $2F, $0E, $EA, $3B, $A1, $BB, $80, $32, $31, $B3, $3E, $18
   .db $38, $8B, $54, $4E, $08, $B9, $6D, $4F, $03, $0D, $42, $6F, $BF, $04, $0A, $F6
   .db $90, $12, $B8, $2C, $79, $7C, $97, $24, $72, $B0, $79, $56, $AF, $89, $AF, $BC
   .db $1F, $77, $9A, $DE, $10, $08, $93, $D9, $12, $AE, $8B, $B3, $2E, $3F, $CF, $DC
   .db $1F, $72, $12, $55, $24, $71, $6B, $2E, $E6, $DD, $1A, $50, $87, $CD, $84, $9F
   .db $18, $47, $58, $7A, $17, $DA, $08, $74, $BC, $9A, $9F, $BC, $8C, $7D, $4B, $E9
   .db $3A, $EC, $7A, $EC, $FA, $1D, $85, $DB, $66, $43, $09, $63, $D2, $C3, $64, $C4
   .db $47, $18, $1C, $EF, $08, $D9, $15, $32, $37, $3B, $43, $DD, $16, $BA, $C2, $24
   .db $43, $4D, $A1, $12, $51, $C4, $65, $2A, $02, $00, $94, $50, $DD, $E4, $3A, $13
   .db $9E, $F8, $DF, $71, $55, $4E, $31, $10, $D6, $77, $AC, $81, $9B, $19, $11, $5F
   .db $F1, $56, $35, $04, $6B, $C7, $A3, $D7, $3B, $18, $11, $3C, $09, $A5, $24, $59
   .db $ED, $E6, $8F, $F2, $FA, $FB, $F1, $97, $2C, $BF, $BA, $9E, $6E, $3C, $15, $1E
   .db $70, $45, $E3, $86, $B1, $6F, $E9, $EA, $0A, $5E, $0E, $86, $B3, $2A, $3E, $5A
   .db $1C, $E7, $1F, $77, $FA, $06, $3D, $4E, $B9, $DC, $65, $29, $0F, $1D, $E7, $99
   .db $D6, $89, $3E, $80, $25, $C8, $66, $52, $78, $C9, $4C, $2E, $6A, $B3, $10, $9C
   .db $BA, $0E, $15, $C6, $78, $EA, $E2, $94, $53, $3C, $FC, $A5, $F4, $2D, $0A, $1E
   .db $A7, $4E, $F7, $F2, $3D, $2B, $1D, $36, $0F, $26, $39, $19, $60, $79, $C2, $19
   .db $08, $A7, $23, $52, $B6, $12, $13, $F7, $6E, $FE, $AD, $EB, $66, $1F, $C3, $EA
   .db $95, $45, $BC, $E3, $83, $C8, $7B, $A6, $D1, $37, $7F, $B1, $28, $FF, $8C, $01
   .db $EF, $DD, $32, $C3, $A5, $5A, $6C, $BE, $85, $21, $58, $65, $02, $98, $AB, $68
   .db $0F, $A5, $CE, $EE, $3B, $95, $2F, $DB, $AD, $7D, $EF, $2A, $84, $2F, $6E, $5B
   .db $28, $B6, $21, $15, $70, $61, $07, $29, $75, $47, $DD, $EC, $10, $15, $9F, $61
   .db $30, $A8, $CC, $13, $96, $BD, $61, $EB, $1E, $FE, $34, $03, $CF, $63, $03, $AA
   .db $90, $5C, $73, $B5, $39, $A2, $70, $4C, $0B, $9E, $9E, $D5, $14, $DE, $AA, $CB
   .db $BC, $86, $CC, $EE, $A7, $2C, $62, $60, $AB, $5C, $AB, $9C, $6E, $84, $F3, $B2
   .db $AF, $1E, $8B, $64, $CA, $F0, $BD, $19, $B9, $69, $23, $A0, $50, $BB, $5A, $65
   .db $32, $5A, $68, $40, $B3, $B4, $2A, $3C, $D5, $E9, $9E, $31, $F7, $B8, $21, $C0
   .db $19, $0B, $54, $9B, $99, $A0, $5F, $87, $7E, $99, $F7, $95, $A8, $7D, $3D, $62
   .db $9A, $88, $37, $F8, $77, $2D, $E3, $97, $5F, $93, $ED, $11, $81, $12, $68, $16
   .db $29, $88, $35, $0E, $D6, $1F, $E6, $C7, $A1, $DF, $DE, $96, $99, $BA, $58, $78
   .db $A5, $84, $F5, $57, $63, $72, $22, $1B, $FF, $C3, $83, $9B, $96, $46, $C2, $1A
   .db $EB, $0A, $B3, $CD, $54, $30, $2E, $53, $E4, $48, $D9, $8F, $28, $31, $BC, $6D
   .db $EF, $F2, $EB, $58, $EA, $FF, $C6, $34, $61, $ED, $28, $FE, $73, $3C, $7C, $EE
   .db $D9, $14, $4A, $5D, $E3, $B7, $64, $E8, $14, $5D, $10, $42, $E0, $13, $3E, $20
   .db $B6, $E2, $EE, $45, $EA, $AB, $AA, $A3, $15, $4F, $6C, $DB, $D0, $4F, $CB, $FA
   .db $42, $F4, $42, $C7, $B5, $BB, $6A, $EF, $1D, $3B, $4F, $65, $05, $21, $CD, $41
   .db $9E, $79, $1E, $D8, $C7, $4D, $85, $86, $6A, $47, $4B, $E4, $50, $62, $81, $3D
   .db $F2, $A1, $62, $CF, $46, $26, $8D, $5B, $A0, $83, $88, $FC, $A3, $B6, $C7, $C1
   .db $C3, $24, $15, $7F, $92, $74, $CB, $69, $0B, $8A, $84, $47, $85, $B2, $92, $56
   .db $00, $BF, $5B, $09, $9D, $48, $19, $AD, $74, $B1, $62, $14, $00, $0E, $82, $23
   .db $2A, $8D, $42, $58, $EA, $F5, $55, $0C, $3E, $F4, $AD, $1D, $61, $70, $3F, $23
   .db $92, $F0, $72, $33, $41, $7E, $93, $8D, $F1, $EC, $5F, $D6, $DB, $3B, $22, $6C
   .db $59, $37, $DE, $7C, $60, $74, $EE, $CB, $A7, $F2, $85, $40, $6E, $32, $77, $CE
   .db $84, $80, $07, $A6, $9E, $50, $F8, $19, $55, $D8, $EF, $E8, $35, $97, $D9, $61
   .db $AA, $A7, $69, $A9, $C2, $06, $0C, $C5, $FC, $AB, $04, $5A, $DC, $CA, $0B, $80
   .db $2E, $7A, $44, $9E, $84, $34, $45, $C3, $05, $67, $D5, $FD, $C9, $9E, $1E, $0E
   .db $D3, $DB, $73, $DB, $CD, $88, $55, $10, $79, $DA, $5F, $67, $40, $43, $67, $E3
   .db $65, $34, $C4, $C5, $D8, $38, $3E, $71, $9E, $F8, $28, $3D, $20, $FF, $6D, $F1
   .db $E7, $21, $3E, $15, $4A, $3D, $B0, $8F, $2B, $9F, $E3, $E6, $F7, $AD, $83, $DB
   .db $68, $5A, $3D, $E9, $F7, $40, $81, $94, $1C, $26, $4C, $F6, $34, $29, $69, $94
   .db $F7, $20, $15, $41, $F7, $D4, $02, $76, $2E, $6B, $F4, $BC, $68, $00, $A2, $D4
   .db $71, $24, $08, $D4, $6A, $F4, $20, $33, $B7, $D4, $B7, $43, $AF, $61, $00, $50
   .db $2E, $F6, $39, $1E, $46, $45, $24, $97, $74, $4F, $21, $14, $40, $88, $8B, $BF
   .db $1D, $FC, $95, $4D, $AF, $91, $B5, $96, $D3, $DD, $F4, $70, $45, $2F, $A0, $66
   .db $EC, $09, $BC, $BF, $85, $97, $BD, $03, $D0, $6D, $AC, $7F, $04, $85, $CB, $31
   .db $B3, $27, $EB, $96, $41, $39, $FD, $55, $E6, $47, $25, $DA, $9A, $0A, $CA, $AB
   .db $25, $78, $50, $28, $F4, $29, $04, $53, $DA, $86, $2C, $0A, $FB, $6D, $B6, $E9
   .db $62, $14, $DC, $68, $00, $69, $48, $D7, $A4, $C0, $0E, $68, $EE, $8D, $A1, $27
   .db $A2, $FE, $3F, $4F, $8C, $AD, $87, $E8, $06, $E0, $8C, $B5, $B6, $D6, $F4, $7A
   .db $7C, $1E, $CE, $AA, $EC, $5F, $37, $D3, $99, $A3, $78, $CE, $42, $2A, $6B, $40
   .db $35, $9E, $FE, $20, $B9, $85, $F3, $D9, $AB, $D7, $39, $EE, $8B, $4E, $12, $3B
   .db $F7, $FA, $C9, $1D, $56, $18, $6D, $4B, $31, $66, $A3, $26, $B2, $97, $E3, $EA
   .db $74, $FA, $6E, $3A, $32, $43, $5B, $DD, $F7, $E7, $41, $68, $FB, $20, $78, $CA
   .db $4E, $F5, $0A, $FB, $97, $B3, $FE, $D8, $AC, $56, $40, $45, $27, $95, $48, $BA
   .db $3A, $3A, $53, $55, $87, $8D, $83, $20, $B7, $A9, $6B, $FE, $4B, $95, $96, $D0
   .db $BC, $67, $A8, $55, $58, $9A, $15, $A1, $63, $29, $A9, $CC, $33, $DB, $E1, $99
   .db $56, $4A, $2A, $A6, $F9, $25, $31, $3F, $1C, $7E, $F4, $5E, $7C, $31, $29, $90
   .db $02, $E8, $F8, $FD, $70, $2F, $27, $04, $5C, $15, $BB, $80, $E3, $2C, $28, $05
   .db $48, $15, $C1, $95, $22, $6D, $C6, $E4, $3F, $13, $C1, $48, $DC, $86, $0F, $C7
   .db $EE, $C9, $F9, $07, $0F, $1F, $04, $41, $A4, $79, $47, $40, $17, $6E, $88, $5D
   .db $EB, $51, $5F, $32, $D1, $C0, $9B, $D5, $8F, $C1, $BC, $F2, $64, $35, $11, $41
   .db $34, $78, $7B, $25, $60, $9C, $2A, $60, $A3, $E8, $F8, $DF, $1B, $6C, $63, $1F
   .db $C2, $B4, $12, $0E, $9E, $32, $E1, $02, $D1, $4F, $66, $AF, $15, $81, $D1, $CA
   .db $E0, $95, $23, $6B, $E1, $92, $3E, $33, $62, $0B, $24, $3B, $22, $B9, $BE, $EE
   .db $0E, $A2, $B2, $85, $99, $0D, $BA, $E6, $8C, $0C, $72, $DE, $28, $F7, $A2, $2D
   .db $45, $78, $12, $D0, $FD, $94, $B7, $95, $62, $08, $7D, $64, $F0, $F5, $CC, $E7
   .db $6F, $A3, $49, $54, $FA, $48, $7D, $87, $27, $FD, $9D, $C3, $1E, $8D, $3E, $F3
   .db $41, $63, $47, $0A, $74, $FF, $2E, $99, $AB, $6E, $6F, $3A, $37, $FD, $F8, $F4
   .db $60, $DC, $12, $A8, $F8, $DD, $EB, $A1, $4C, $E1, $1B, $99, $0D, $6B, $6E, $DB
   .db $10, $55, $7B, $C6, $37, $2C, $67, $6D, $3B, $D4, $65, $27, $04, $E8, $D0, $DC
   .db $C7, $0D, $29, $F1, $A3, $FF, $00, $CC, $92, $0F, $39, $B5, $0B, $ED, $0F, $69
   .db $FB, $9F, $7B, $66, $9C, $7D, $DB, $CE, $0B, $CF, $91, $A0, $A3, $5E, $15, $D9
   .db $88, $2F, $13, $BB, $24, $AD, $5B, $51, $BF, $79, $94, $7B, $EB, $D6, $3B, $76
   .db $B3, $2E, $39, $37, $79, $59, $11, $CC, $97, $E2, $26, $80, $2D, $31, $2E, $F4
   .db $A7, $AD, $42, $68, $3B, $2B, $6A, $C6, $CC, $4C, $75, $12, $1C, $F1, $2E, $78
   .db $37, $42, $12, $6A, $E7, $51, $92, $B7, $E6, $BB, $A1, $06, $50, $63, $FB, $4B
   .db $18, $10, $6B, $1A, $FA, $ED, $CA, $11, $D8, $BD, $25, $3D, $C9, $C3, $E1, $E2
   .db $59, $16, $42, $44, $86, $13, $12, $0A, $6E, $EC, $0C, $D9, $2A, $EA, $AB, $D5
   .db $4E, $67, $AF, $64, $5F, $A8, $86, $DA, $88, $E9, $BF, $BE, $FE, $C3, $E4, $64
   .db $57, $80, $BC, $9D, $86, $C0, $F7, $F0, $F8, $7B, $78, $60, $4D, $60, $03, $60
   .db $46, $83, $FD, $D1, $B0, $1F, $38, $F6, $04, $AE, $45, $77, $CC, $FC, $36, $D7
   .db $33, $6B, $42, $83, $71, $AB, $1E, $F0, $87, $41, $80, $B0, $5F, $5E, $00, $3C
   .db $BE, $57, $A0, $77, $24, $AE, $E8, $BD, $99, $42, $46, $55, $61, $2E, $58, $BF
   .db $8F, $F4, $58, $4E, $A2, $FD, $DD, $F2, $38, $EF, $74, $F4, $C2, $BD, $89, $87
   .db $C3, $F9, $66, $53, $74, $8E, $B3, $C8, $55, $F2, $75, $B4, $B9, $D9, $FC, $46
   .db $61, $26, $EB, $7A, $84, $DF, $1D, $8B, $79, $0E, $6A, $84, $E2, $95, $5F, $91
   .db $8E, $59, $6E, $46, $70, $57, $B4, $20, $91, $55, $D5, $8C, $4C, $DE, $02, $C9
   .db $E1, $AC, $0B, $B9, $D0, $05, $82, $BB, $48, $62, $A8, $11, $9E, $A9, $74, $75
   .db $B6, $19, $7F, $B7, $09, $DC, $A9, $E0, $A1, $09, $2D, $66, $33, $46, $32, $C4
   .db $02, $1F, $5A, $E8, $8C, $BE, $F0, $09, $25, $A0, $99, $4A, $10, $FE, $6E, $1D
   .db $1D, $3D, $B9, $1A, $DF, $A4, $A5, $0B, $0F, $F2, $86, $A1, $69, $F1, $68, $28
   .db $83, $DA, $B7, $DC, $FE, $06, $39, $57, $9B, $CE, $E2, $A1, $52, $7F, $CD, $4F
   .db $01, $5E, $11, $50, $FA, $83, $06, $A7, $C4, $B5, $02, $A0, $27, $D0, $E6, $0D
   .db $27, $8C, $F8, $9A, $41, $86, $3F, $77, $06, $4C, $60, $C3, $B5, $06, $A8, $61
   .db $28, $7A, $17, $F0, $E0, $86, $F5, $C0, $AA, $58, $60, $00, $62, $7D, $DC, $30
   .db $D7, $9E, $E6, $11, $63, $EA, $38, $23, $94, $DD, $C2, $53, $34, $16, $C2, $C2
   .db $56, $EE, $CB, $BB, $DE, $B6, $BC, $90, $A1, $7D, $FC, $EB, $76, $1D, $59, $CE
   .db $09, $E4, $05, $6F, $88, $01, $7C, $4B, $3D, $0A, $72, $39, $24, $7C, $92, $7C
   .db $5F, $72, $E3, $86, $B9, $9D, $4D, $72, $B4, $5B, $C1, $1A, $FC, $B8, $9E, $D3
   .db $78, $55, $54, $ED, $B5, $A5, $FC, $08, $D3, $7C, $3D, $D8, $C4, $0F, $AD, $4D
   .db $5E, $EF, $50, $1E, $F8, $E6, $61, $B1, $D9, $14, $85, $A2, $3C, $13, $51, $6C
   .db $E7, $C7, $D5, $6F, $C4, $4E, $E1, $56, $CE, $BF, $2A, $36, $37, $C8, $C6, $DD
   .db $34, $32, $9A, $D7, $12, $82, $63, $92, $8E, $FA, $0E, $67, $E0, $00, $60, $40
   .db $37, $CE, $39, $3A, $CF, $F5, $FA, $D3, $37, $77, $C2, $AB, $1B, $2D, $C5, $5A
   .db $9E, $67, $B0, $5C, $42, $37, $A3, $4F, $40, $27, $82, $D3, $BE, $9B, $BC, $99
   .db $9D, $8E, $11, $D5, $15, $73, $0F, $BF, $7E, $1C, $2D, $D6, $7B, $C4, $00, $C7
   .db $6B, $1B, $8C, $B7, $45, $90, $A1, $21, $BE, $B1, $6E, $B2, $B4, $6E, $36, $6A
   .db $2F, $AB, $48, $57, $79, $6E, $94, $BC, $D2, $76, $A3, $C6, $C8, $C2, $49, $65
   .db $EE, $F8, $0F, $53, $7D, $DE, $8D, $46, $1D, $0A, $73, $D5, $C6, $4D, $D0, $4C
   .db $DB, $BB, $39, $29, $50, $46, $BA, $A9, $E8, $26, $95, $AC, $04, $E3, $5E, $BE
   .db $F0, $D5, $FA, $A1, $9A, $51, $2D, $6A, $E2, $8C, $EF, $63, $22, $EE, $86, $9A
   .db $B8, $C2, $89, $C0, $F6, $2E, $24, $43, $AA, $03, $1E, $A5, $A4, $D0, $F2, $9C
   .db $BA, $61, $C0, $83, $4D, $6A, $E9, $9B, $50, $15, $E5, $8F, $D6, $5B, $64, $BA
   .db $F9, $A2, $26, $28, $E1, $3A, $3A, $A7, $86, $95, $A9, $4B, $E9, $62, $55, $EF
   .db $D3, $EF, $2F, $C7, $DA, $F7, $52, $F7, $69, $6F, $04, $3F, $59, $0A, $FA, $77
   .db $15, $A9, $E4, $80, $01, $86, $B0, $87, $AD, $E6, $09, $9B, $93, $E5, $3E, $3B
   .db $5A, $FD, $90, $E9, $97, $D7, $34, $9E, $D9, $B7, $F0, $2C, $51, $8B, $2B, $02
   .db $3A, $AC, $D5, $96, $7D, $A6, $7D, $01, $D6, $3E, $CF, $D1, $28, $2D, $7D, $7C
   .db $CF, $25, $9F, $1F, $9B, $B8, $F2, $AD, $72, $B4, $D6, $5A, $4C, $F5, $88, $5A
   .db $71, $AC, $29, $E0, $E6, $A5, $19, $E0, $FD, $AC, $B0, $47, $9B, $FA, $93, $ED
   .db $8D, $C4, $D3, $E8, $CC, $57, $3B, $28, $29, $66, $D5, $F8, $28, $2E, $13, $79
   .db $91, $01, $5F, $78, $55, $60, $75, $ED, $44, $0E, $96, $F7, $8C, $5E, $D3, $E3
   .db $D4, $6D, $05, $15, $BA, $6D, $F4, $88, $25, $61, $A1, $03, $BD, $F0, $64, $05
   .db $15, $9E, $EB, $C3, $A2, $57, $90, $3C, $EC, $1A, $27, $97, $2A, $07, $3A, $A9
   .db $9B, $6D, $3F, $1B, $F5, $21, $63, $1E, $FB, $66, $9C, $F5, $19, $F3, $DC, $26
   .db $28, $D9, $33, $75, $F5, $FD, $55, $B1, $82, $34, $56, $03, $BB, $3C, $BA, $8A
   .db $11, $77, $51, $28, $F8, $D9, $0A, $C2, $67, $51, $CC, $AB, $5F, $92, $AD, $CC
   .db $51, $17, $E8, $4D, $8E, $DC, $30, $38, $62, $58, $9D, $37, $91, $F9, $20, $93
   .db $C2, $90, $7A, $EA, $CE, $7B, $3E, $FB, $64, $CE, $21, $51, $32, $BE, $4F, $77
   .db $7E, $E3, $B6, $A8, $46, $3D, $29, $C3, $69, $53, $DE, $48, $80, $E6, $13, $64
   .db $10, $08, $AE, $A2, $24, $B2, $6D, $DD, $FD, $2D, $85, $69, $66, $21, $07, $09
   .db $0A, $46, $9A, $B3, $DD, $C0, $45, $64, $CF, $DE, $6C, $58, $AE, $C8, $20, $1C
   .db $DD, $F7, $BE, $5B, $40, $8D, $58, $1B, $7F, $01, $D2, $CC, $BB, $E3, $B4, $6B
   .db $7E, $6A, $A2, $DD, $45, $FF, $59, $3A, $44, $0A, $35, $3E, $D5, $CD, $B4, $BC
   .db $A8, $CE, $EA, $72, $BB, $84, $64, $FA, $AE, $12, $66, $8D, $47, $6F, $3C, $BF
   .db $63, $E4, $9B, $D2, $9E, $5D, $2F, $54, $1B, $77, $C2, $AE, $70, $63, $4E, $F6
   .db $8D, $0D, $0E, $74, $57, $13, $5B, $E7, $71, $16, $72, $F8, $5D, $7D, $53, $AF
   .db $08, $CB, $40, $40, $CC, $E2, $B4, $4E, $6A, $46, $D2, $34, $84, $AF, $15, $01
   .db $28, $04, $B0, $E1, $1D, $3A, $98, $95, $B4, $9F, $B8, $06, $48, $A0, $6E, $CE
   .db $82, $3B, $3F, $6F, $82, $AB, $20, $35, $4B, $1D, $1A, $01, $F8, $27, $72, $27
   .db $B1, $60, $15, $61, $DC, $3F, $93, $E7, $2B, $79, $3A, $BB, $BD, $25, $45, $34
   .db $E1, $39, $88, $A0, $4B, $79, $CE, $51, $B7, $C9, $32, $2F, $C9, $BA, $1F, $A0
   .db $7E, $C8, $1C, $E0, $F6, $D1, $C7, $BC, $C3, $11, $01, $CF, $C7, $AA, $E8, $A1
   .db $49, $87, $90, $1A, $9A, $BD, $4F, $D4, $CB, $DE, $DA, $D0, $38, $DA, $0A, $D5
   .db $2A, $C3, $39, $03, $67, $36, $91, $C6, $7C, $31, $F9, $8D, $4F, $2B, $B1, $E0
   .db $B7, $59, $9E, $F7, $3A, $BB, $F5, $43, $FF, $19, $D5, $F2, $9C, $45, $D9, $27
   .db $2C, $22, $97, $BF, $2A, $FC, $E6, $15, $71, $FC, $91, $0F, $25, $15, $94, $9B
   .db $61, $93, $E5, $FA, $EB, $9C, $B6, $CE, $59, $64, $A8, $C2, $D1, $A8, $BA, $12
   .db $5E, $07, $C1, $B6, $0C, $6A, $05, $E3, $65, $50, $D2, $10, $42, $A4, $03, $CB
   .db $0E, $6E, $EC, $E0, $3B, $DB, $98, $16, $BE, $A0, $98, $4C, $64, $E9, $78, $32
   .db $32, $95, $1F, $9F, $DF, $92, $D3, $E0, $2B, $34, $A0, $D3, $1E, $F2, $71, $89
   .db $41, $74, $0A, $1B, $8C, $34, $A3, $4B, $20, $71, $BE, $C5, $D8, $32, $76, $C3
   .db $8D, $9F, $35, $DF, $2E, $2F, $99, $9B, $47, $6F, $0B, $E6, $1D, $F1, $E3, $0F
   .db $54, $DA, $4C, $E5, $91, $D8, $DA, $1E, $CF, $79, $62, $CE, $6F, $7E, $3E, $CD
   .db $66, $B1, $18, $16, $05, $1D, $2C, $FD, $C5, $D2, $8F, $84, $99, $22, $FB, $F6
   .db $57, $F3, $23, $F5, $23, $76, $32, $A6, $31, $35, $A8, $93, $02, $CD, $CC, $56
   .db $62, $81, $F0, $AC, $B5, $EB, $75, $5A, $97, $36, $16, $6E, $CC, $73, $D2, $88
   .db $92, $62, $96, $DE, $D0, $49, $B9, $81, $1B, $90, $50, $4C, $14, $56, $C6, $71
   .db $BD, $C7, $C6, $E6, $0A, $14, $7A, $32, $06, $D0, $E1, $45, $9A, $7B, $F2, $C3
   .db $FD, $53, $AA, $C9, $00, $0F, $A8, $62, $E2, $BF, $25, $BB, $F6, $D2, $BD, $35
   .db $05, $69, $12, $71, $22, $02, $04, $B2, $7C, $CF, $CB, $B6, $2B, $9C, $76, $CD
   .db $C0, $3E, $11, $53, $D3, $E3, $40, $16, $60, $BD, $AB, $38, $F0, $AD, $47, $25
   .db $9C, $20, $38, $BA, $76, $CE, $46, $F7, $C5, $A1, $AF, $77, $60, $60, $75, $20
   .db $4E, $FE, $CB, $85, $D8, $8D, $E8, $8A, $B0, $F9, $AA, $7A, $7E, $AA, $F9, $4C
   .db $5C, $C2, $48, $19, $8C, $8A, $FB, $02, $E4, $6A, $C3, $01, $F9, $E1, $EB, $D6
   .db $69, $F8, $D4, $90, $A0, $DE, $5C, $A6, $2D, $25, $09, $3F, $9F, $E6, $08, $C2
   .db $32, $61, $4E, $B7, $5B, $E2, $77, $CE, $E3, $DF, $8F, $57, $E6, $72, $C3, $3A

_________________
6502 yeah~!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Jan 22, 2005 6:05 pm 
Offline

Joined: Thu May 08, 2003 6:27 pm
Posts: 4
Oh, I'm sorry that this code include no comment.
Some extra literature will be needed if you really want to understand it instead of just use it.

My literature about Blowfish is in Chinese , so I will not post it here.

_________________
6502 yeah~!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: