|
Convert Rainbow Table Between .rt and .rtc File Format
Introduction
The RainbowCrack software consists of five tools: rtgen, rtsort, rt2rtc, rtc2rt and rcrack. Figure below explains the relationship between the tools.

The rtgen, rtsort and rcrack tools are explained in RainbowCrack Tutorial. The rt2rtc and rtc2rt tools introduced in RainbowCrack 1.4 convert rainbow table between raw file format (.rt) and compact file format (.rtc). Rainbow tables stored in compact file format are usually much smaller. Smaller rainbow tables reduce storage requirement and increase performance of rcrack tool.
This document explains how to convert rainbow tables between .rt and .rtc file formats.
Convert rainbow table from .rt file format to .rtc file format
The rt2rtc tool converts rainbow table from .rt file format to .rtc file format.
Command line of rt2rtc tool is:
rt2rtc rt_files start_point_bits end_point_bits [-m chunk_size_in_mb] [-p]
The "rt_files" parameter specify the rainbow tables to be converted. For example "c:\rt\*.rt".
The "start_point_bits" and "end_point_bits" parameters are numbers. They specify how many bits are used to encode the start point and end point of each rainbow chain.
Rainbow tables in .rt file format always use 64 bits to store the start point and 64 bits for the end point. So each rainbow chain requires 64 bits + 64 bits = 128 bits = 16 bytes. In the new .rtc file format, number of bits that is used to store the start point and end point is configurable. If the start point uses 25 bits and the end point uses 31 bits, one rainbow chain requires 25 bits + 31 bits = 56 bits = 7 bytes.
As an example, we will convert the rainbow table "lm_alpha-numeric#1-7".
Input files:
Assume all .rt rainbow tables are in current directory, the command line that do the conversion is:
Screen output:
Output files:
The rt2rtc program read the .rt rainbow tables one by one and write the .rtc rainbow tables to the current directory.
The minimal value of "start_point_bits" and "end_point_bits" of each rainbow table is displayed. You may want to try different values in the command line.
If the bit number parameters given in command line are too small, the conversion can fail. And the partially converted .rtc rainbow tables should be deleted manually.
The suggested parameters that convert the rainbow tables in rainbow table page are here. Different parameters can also work.
Assume a rainbow table consists of "chain_num" rainbow chains, the size of a rainbow table will be:
size of .rt rainbow table = 16 * chain_num
size of .rtc rainbow table = 32 + (start_point_bits + end_point_bits + 7) / 8 * chain_num
A 32-byte file header is added to store additional information of .rtc rainbow table, including the "start_point_bits" and "end_point_bits" parameters. Visit here for the file format of .rtc rainbow table.
Convert rainbow table from .rtc file format to .rt file format
The rtc2rt tool converts rainbow table from .rtc file format to .rt file format.
Command line of rtc2rt tool is:
rtc2rt rtc_files
Assume all .rtc rainbow tables are in current directory, the command line that do the conversion is:
The rtc2rt program read the .rtc rainbow tables one by one and write the .rt rainbow tables to the current directory.
The .rt rainbow tables converted from .rtc rainbow tables SHOULD be identical to original .rt rainbow tables. If we confirm that the .rtc rainbow tables work well and the .rt and .rtc rainbow tables can be converted to each other, it is safe to delete the .rt rainbow tables and free up the hard disk space.
Convert non-perfect rainbow table to perfect rainbow table
Figure below explains the operation:

Perfect rainbow tables are those rainbow tables without identical end points. Rainbow tables generated by rtgen include lots of rainbow chains merged and produce identical end points. So normal rainbow tables are not perfect rainbow tables.
Perfect rainbow tables store more <plaintext, hash> pairs than non-perfect rainbow tables with same amount of rainbow chains, resulting higher success rate. They can only be extracted from non-perfect rainbow tables by discarding identical end points. The rt2rtc tool support this operation with "-m" and "-p" options.
As an example, we will convert the rainbow table "lm_ascii-32-65-123-4#1-7".
Input files:
Assume all .rt rainbow tables are in current directory, the command line that do the conversion is:
|
rt2rtc *.rt 29 35 -m 1024 -p
|
We use 29 bits to store the encoded start point and 35 bits for the encoded end point. Good values of these two parameters depend on the rainbow tables you are converting.
The "-p" parameter means perfect rainbow table.
The "-m" parameter instructs the tool to convert the rainbow tables group by group, instead of file by file. In this example, the first 8 files lm_ascii-32-65-123-4#1-7_0_*.rt logically belong to same rainbow table. Rainbow chains belong to to same rainbow table can merge, whatever they are in same file or not.
The "1024" parameter instructs the tool to convert the rainbow tables by chunks of 1024 MB. This parameter controls the file size of each outputted .rtc rainbow tables.
Screen output:
Output files:
Size of original .rt rainbow tables is 64 GB, with the success rate 99.9 %.
Size of outputted .rtc rainbow tables is 20.7 GB, and the success rate is reduced to 99.6 % because we discarded some rainbow chains. The discarded rainbow chains also contribute to the success rate.
If we convert these .rt rainbow tables to non-perfect .rtc rainbow tables, size of outputted .rtc rainbow tables will be 32 GB. The success rate is still 99.9 %.
When rainbow tables are converted to perfect rainbow tables, some rainbow chains are discarded. So if we convert the .rtc rainbow tables back to .rt rainbow tables with rtc2rt tool, the outputted .rt rainbow tables will be differ from original .rt rainbow tables. In fact, they are perfect rainbow tables in .rt file format.
Copyright 2003-2010 RainbowCrack Project. All rights reserved.
|