11 November 2000
London

Sylvain Martinez

--------
CONTENTS
--------

I    - HOW TO USE BUGS'S LIBRARY IN YOUR PROG ?

II   - What the BSSL option in bcrypt and bchat ?

III  - BCRYPT

IV   - BHIDE

V    - BKEY

VI   - BPASS

VII  - BPASSDEL

VIII - BLOGIN

IX   - BCHAT

X    - BLOCK

XI   - BUNLOCK

XII  - BMORE

------------------------------------------
------------------------------------------


I HOW TO USE BUGS'S LIBRARY IN YOUR PROG ?
------------------------------------------ 
 
     if you want to use one of my functions in your own programm , for example
     toto.c , you just have to do:
 
                gcc -o toto.c libcrypt.a -lc    

II What the BSSL option in bcrypt and bchat ?
---------------------------------------------

levels currently available:
D_ = Dynamic
               Keylength|Key Buffer|D_Buff|D_Round|D_Swap|D_Swap|Power
BSSL_VLOW:     128      |8         |no    |no     |no    |no    |2
BSSL_LOW:      128      |8         |no    |no     |yes   |yes   |3
BSSL_MEDIUM:   128      |16        |yes   |yes    |yes   |yes   |4
BSSL_HIGH:     256      |16        |yes   |yes    |yes   |yes   |4
BSSL_VHIGH:    512      |32        |yes   |yes    |yes   |yes   |4


III BCRYPT
----------

Note about the ASCII mode (-a flag):
When you are using the ASCII mode to generate a crypted file,
the following KEYWORDS will be added at the beginning and the end of the 
crypted file:
[BUGS_ASCII_MODE_V04_START]
[BUGS_ASCII_MODE_V04_END]
This allows you to send an email, copy and paste the crypted file (including 
these KEYWORDS). Then, when you want to decrypt the email you can just save
it as a file, decrypt it using the -a flag  and then the BUGS algorithm will
only decrypt the data between the 2 KEYWORDS.
Make sure you are using the same BUGS_ASCII_MODE Version ! as they are not
compatible between them !
The algorithm should ignore any charaters such as: ;>,.$ etc


Display bcrypt help
>bcrypt -help

Interactive mode (where you are prompted for each parameter required)
>bcrypt -i

Crypt a file
>bcrypt -c -s sourcefile -d destfile

Crypt a file and produce an ASCII result (that you can copy and paste in a text
editor)
>bcrypt -c -s sourcefile d destfile -a

Crypt a file without displaying the information output
>bcrypt -c -s sourcefile -d destfile -quiet

Crypt a file and display debug information (trace of the crypt algorithm)
and redirect the output in a file called 'err'
>bcrypt -c -s sourcefile -d destfile -v 2>err

Crypt a file and automatically redirect the output to a file called err
>bcrypt -c -s sourcefile -d destfile -v -ef err

Crypt a file and automatically redirect the output to a default file called
bcrypt.log
>bcrypt -c -s sourcefile -d destfile -v -ef

Crypt a file using the power 1 (probaility seed only)
>bcrypt -c -s sourcefile -d destfile -p 1

Crypt a file using a keylength of 512 bits
>bcrypt -c -s sourcefile -d destfile -k 512

Crypt a file using a keylength of 512 bits and a keyfile called 'keyfile'
(this mean the password will be the 'keyfile')
>bcrypt -c -s sourcefile -d destfile -k 512 -f keyfile

Crypt a file using a custom block's crypt of 30 BYTES
>bcrypt -c -s sourcefile -d destfile -bc 30

Crypt a file using a custom block's crypt of 50 BYTES and shuffle's block of 
8 BYTES
>bcrypt -c -s sourcefile -d destfile -bc 50 -bs 8

Crypt a file using a Keygenerator complexity of 4
(default is 2, which is secure enough !, using higher value should
 be stronger but I didn't have tim eto prove it, and it is anyway
 slower)
>bcrypt -c -s sourcefile -d destfile -comp 4 

Crypt a file using the hardisk method
>bcrypt -c -s sourcefile -d destfile -hd

DECRYPT a file using a 512 bits keylength
>bcrypt -u -s cryptedfile -d resultfile -k 512

DECRYPT a file that has previously been crypted in ASCII mode
>bcrypt -u -s cryptedfile -d resultfile -a

Crypt a file and send the password "helloworld" as a parameter
>bcrypt -c -s sourcefile -d destfile -pwd helloworld

Crypt a file with a custom Buffer of Key used for the SEED
>bcrypt -c -s sourcefile -d destfile -bk 37

Crypt a file with no Dynamic block shuffle nor Dynamic modulo swap
>bcrypt -c -s sourcefile -d destfile -dshuf n -dswap n


IV BHIDE
---------

Hide a file A at the end of a file B
>bhide -h -s A -d B

V BKEY
-------

Automaticaly generate a keyfile of 512 bits
>bkey -auto -f keyfile -k 512

VI BPASS
--------

Create a user toto using a password of 128 bits
>bpass -u toto

Create a user toto using a password of 512 bits
>bpass -u -toto -k 512

Change toto's password
(if you have just created toto using a 512 bits password
 WARNING: in a same password file you can't have password
          with different keylength)
>bpass -u toto -k 512
(the program will first ask you the old password and then the new one)

VII BPASSDEL
------------

Delete the user toto
>bpasdel -f passwordfile -u toto -k 512

VIII BLOGIN
-----------

    You have to execute go_shell.
    Why ?
    Simply because, if you are already using blogin, you can't compile it !
 
    After, you just have to change your shell, because blogin adds a menu,
    asks for a passwd and ONLY AFTER the second passwd (that is generated
    by bpass) blogin starts a SHELL.
 
    YOU MUST CREATE A PASSWD FILE BEFORE WITH BPASS
 
    and PUT the files codes in YOUR ROOT PATH (ex: ~/codes)
 
    So you have to do : chsh ~/bugs-3.0.0/blogin username
 
    REMEMBER THAT YOU MUSN'T ERASE blogin NOW !!!!
    OTHERWISE YOU WON'T BE ABLE TO LOGGON AGAIN !!!
    I WILL NOT BE RESPONSABLE ... you have been warning ...
 
    This programm is powerfull but is quite difficult to install,
    you must be concentrated and you must know what you are doing.
 
    This programm work very well on LINUX,HP-UX
    (for the other I haven't tested yet)                      

IX BCHAT
--------

YOU HAVE TO START THE SERVER BEFORE THE CLIENT !

Start the server using the standard BCHAT port (3333)
>bchat

Interactive mode (where you are prompted for each parameter required)
>bchat -i                                                                                                   
Start the client
You first need to get the ip address of the server.
>bchat -server ip_address_of_the_server

Start the server on a different port
>bchat -port 4000

Start the client on a different port (2000) and access the server on the port 
4000
> bchat -port 2000 -server ip_address -serverport 4000

Start the server and do not encrypt network transmission
> bchat -nocrypt
Please note that the client will have to do the same if you want the 
"conversation" to be understandable as otherwise the client will crypt
its transmission.

WARNING:
By the default the warning message are off, this is because it would interfer
with your display, if you've got any problem set the warning flag
and redirect the error output in a file (err)
> bchat -v 2>err

if it doesn't display enough information set the DEBUG flag:
> bchat -debug 2>err


X BLOCK
-------

Display block help
> block -help

Crypt a file
> block file_to_crypt

XI BUNLOCK
----------

Display bunlock help
> bunlock -help

Decrypt a file which has been crypted by block before
> bunlock crypted_file
After you entered your password the old crypted file will be copied as
crypted_file.bugsold
This is because if you don't enter the right password the original file could
be lost. If this happened you still have the crypted file as
crypted_file.bugsold and you can try again with the correct password.


XII BMORE
---------

Display bmore help
> bmore crypted_file

Uncrypt a file in moemory previously crypted by block and display it
> bmore crypted_file


