
# Copyright (C) 1997 Farrell McKay
# All rights reserved.
#
# This file is part of the Fortify distribution, a toolkit for
# upgrading the cryptographic strength of the Netscape Navigator
# web browser, authored by Farrell McKay.
#
# This toolkit is provided to the recipient under the
# following terms and conditions:-
#   1.  This copyright notice must not be removed or modified.
#   2.  This toolkit may not be reproduced or included in any commercial
#       media distribution, or commercial publication (for example CD-ROM,
#       disk, book, magazine, journal) without first obtaining the author's
#       permission.
#   3.  Subject to the above conditions being observed (1,2), this toolkit
#       may be freely reproduced or redistributed.
#   4.  This software is provided "as-is", without express or implied
#       warranty.  In no event shall the author be liable for any direct,
#       indirect or consequential damages however caused.
#   5.  Subject to the above conditions being observed (1-4),
#       this toolkit may be used at no cost to the recipient.
#
# Farrell McKay			Farrell.McKay@mpx.com.au

init {
	grammar		1.1
	target		"navigator-v301-export.alpha-dec-osf2.0"
	text_offset	0x12000000
	data_offset	0x13c32000
	rodata_offset	0x13c32000
}
_main {
	segment		text
	msg		"main"
	base		0x120dee30
        offset          0x0
	context		0x00 0xf0 0x1e 0xa7	# ldq   t10, -4096(sp)
			0x50 0xe8 0xde 0x23	# lda   sp, -6064(sp)
			0x13 0x02 0xbb 0x27	# ldah  gp, 34799616(t12)
			0x20 0x00 0x5e 0xb7	# stq   ra, 32(sp)
}
p0a {
	segment		text
	msg		"Changing domestic/export function"
	base		0x12363b60
	offset		0x0
	old_value	0x00 0x04 0xff 0x47	# clr   v0
	new_value	0x00 0x34 0xe0 0x43	# addq  zero, #1, v0
}
p1a {
	segment		text
	msg		"Altering cipher specs function - v2 mask tests"
	base		0x12363b80
	offset		0x28
	old_value	0x04 0x10 0x01 0x44	# and  v0, #8, t3
	new_value	0x04 0x30 0x00 0x44	# and  v0, #1, t3
}
p1b {
	segment		text
	msg		"Altering cipher specs function - v2 mask tests"
	base		0x12363b80
	offset		0xcc
	old_value	0x07 0x10 0x01 0x44	# and  v0, #8, t6
	new_value	0x07 0x30 0x00 0x44	# and  v0, #1, t6
}
p1c {
	segment		text
	msg		"Altering cipher specs function - v2 cipher const"
	base		0x12363b80
	offset		0xdc
	old_value	0x08 0x94 0xe0 0x43	# addq  zero, #4, t7
	new_value	0x08 0x34 0xe0 0x43	# addq  zero, #1, t7
}
p2 {
	segment		text
	msg		"Altering cipher enable function - v2 cipher const"
	base		0x12363d20
	offset		0x60
	old_value	0xfc 0x00 0xa5 0x20	# lda  t4, 252(t4)
	new_value	0xff 0x00 0xa5 0x20	# lda  t4, 255(t4)
}
p3 {
	segment		text
	msg		"Altering cipher code test no. 1"
	base		0x12363f00
	offset		0x2c
	old_value	0x22 0x95 0x00 0x40	# subq  v0, #4, t1
	new_value	0x22 0x35 0x00 0x40	# subq  v0, #1, t1
}
p4 {
	segment		text
	msg		"Changing cipher code test no. 2"
	base		0x12364b50
	offset		0x88
	old_value	0x24 0x95 0x00 0x40	# subq  v0, #4, t3
	new_value	0x24 0x35 0x00 0x40	# subq  v0, #1, t3
}
p5 {
	segment		text
	msg		"Changing cipher code test no. 3"
	base		0x12364b50
	offset		0x208
	old_value	0x3b 0x95 0x00 0x40	# subq  v0, #4, t12
	new_value	0x3b 0x35 0x00 0x40	# subq  v0, #1, t12
}
p6 {
	segment		text
	msg		"Changing cipher code test no. 4"
	base		0x12364e40
	offset		0x120
	old_value	0x0b 0x00 0xe0 0xe4	# beq  t6, 0x12364f90
	new_value	0x0b 0x00 0xe0 0xec 	# ble  t6, 0x12364f90
}
p7a {
	segment		text
	msg		"Changing cipher characteristics, part 1"
	base		0x12365960
	offset		0x100
	old_value	0x36 0x95 0x20 0x40	# subq  t0, #4, t8
	new_value	0x36 0x35 0x20 0x40	# subq  t0, #1, t8
}
p7b {
	segment		text
	msg		"Changing cipher characteristics, part 2"
	base		0x12365960
	offset		0x130
	old_value	
			0x38 0xb1 0x40 0x40	# sub  t1, #5, t10
			0x38 0x01 0x1e 0xb3	# stl  t10, 312(sp)
			0x9d 0xf6 0x5f 0xd3	# bsr  ra, 0x12363510
			0x00 0x00 0xff 0x63	# trapb
			0xeb 0x01 0xba 0x27	# ldah  gp, 32178176(ra)
			0x40 0x01 0x5e 0xa0	# ldl  t1, 320(sp)
			0xb0 0x00 0x3e 0x23	# lda  t11, 176(sp)
			0x58 0x01 0x3e 0xb7	# stq  t11, 344(sp)
			0x1b 0x14 0xe1 0x43	# addq  zero, #8, t12
	new_value	
			0x18 0x04 0xff 0x47	# clr t10
			0x38 0x01 0x1e 0xb3	# stl  t10, 312(sp)
			0x9d 0xf6 0x5f 0xd3	# bsr  ra, 0x12363510
			0x00 0x00 0xff 0x63	# trapb
			0xeb 0x01 0xba 0x27	# ldah  gp, 32178176(ra)
			0x40 0x01 0x5e 0xa0	# ldl  t1, 320(sp)
			0x19 0x04 0xff 0x47	# clr t11
			0x58 0x01 0x3e 0xb7	# stq  t11, 344(sp)
			0x1b 0x04 0xff 0x47	# clr t12
}
security_code_12 {
	segment		data
	msg		"Changing security code value in .data"
	base		0x14043d98		
	old_value	0x01 0x00 0x00 0x00	# 1
	new_value	0x02 0x00 0x00 0x00	# 2
}
v2_preferred {
	segment		data
	msg		"Changing hard-coded EXP-RC4-MD5 const"
	base		0x141d6530
	old_value	0x02 0x00 0x80 0x00	# EXP-RC4-MD5
			0x00 0x00 0x00 0x00
	new_value	0x01 0x00 0x80 0x00	# RC4-MD5
			0x00 0x00 0x00 0x00
}
v2_enabled {
	segment		data
	msg		"Changing v2 ciphers enabled bit mask"
	base		0x141d65d0
	old_value	0x0a 0x00 0x00 0x00	# 0000 1010
			0x00 0x00 0x00 0x00
			0x0a 0x00 0x00 0x00
			0x00 0x00 0x00 0x00
	new_value	0x03 0x00 0x00 0x00	# 0000 0011
			0x00 0x00 0x00 0x00
			0x03 0x00 0x00 0x00
			0x00 0x00 0x00 0x00
}
v2_cipher_spec {
	segment		data
	msg		"Changing v2 cipher in v2+v3 cipher specs table"
	base		0x141d6860		
	offset		0x20
	old_value	0x04 0xff 0x00 0x00	# EXP-RC2-MD5
	new_value	0x01 0xff 0x00 0x00	# RC4-MD5
}
v3_cipher_spec {
	segment		data
	msg		"Changing v3 cipher in v2+v3 cipher specs table"
	base		0x141d6860		
	offset		0x60
	old_value	0x06 0x00 0x00 0x00	# EXP-RC2-MD5
	new_value	0x04 0x00 0x00 0x00	# RC4-MD5
}
ssl2_cipher_name {
	segment		rodata
	msg		"Changing name of v2 entry in v2+v3 cipher specs table"
	base		0x141d6910
	old_value	"ssl2_rc2_40\000\000"
	new_value	"ssl2_rc4_128\000"
}
ssl3_cipher_name {
	segment		rodata
	msg		"Changing name of v3 entry in v2+v3 cipher specs table"
	base		0x141d6938
	old_value	"ssl3_rsa_rc2_40_md5\000\000"
	new_value	"ssl3_rsa_rc4_128_md5\000"
}
v3_enabled {
	segment		data
	msg		"Changing v3 ciphers enabled table"
	base		0x141d8ee8
	old_value	0x03 0x00 0x06 0x00	# EXP-RC4-MD5 EXP-RC2-CBC-MD5
			0x01 0x00 0x00 0x00
	new_value	0x04 0x00 0x03 0x00	# RC4-MD5 EXP-RC4-MD5
			0x01 0x00 0x00 0x00
}
v2_cipher_descr {
	segment		data
	msg		"Changing v2 cipher description string number."
	base		0x141f29a8
	old_value	0x46 0xe2 0xff 0xff	# --> "RC2 encryption with a 40-bit key"
	new_value	0x41 0xe2 0xff 0xff	# --> "RC4 encryption with a 128-bit key"
}
v3_cipher_descr {
	segment		data
	msg		"Changing v3 cipher description string number."
	base		0x141f2a20
	old_value	0x4b 0xe2 0xff 0xff	# --> "RC2 encryption with a 40-bit key and an MD5 MAC"
	new_value	0x47 0xe2 0xff 0xff	# --> "RC4 encryption with a 128-bit key and an MD5 MAC"
}
version_str {
	segment		rodata
	msg		"Altering the -v version string in .rodata"
	base		0x14215f24		
	offset		0x0e
	old_value	"export,"
	new_value	"Fortify"
}
