tcl/tk as a front end for PGP ? 
Author Message
 tcl/tk as a front end for PGP ?

: Has anyone written any tcl/tk as a PGP's shell?

For about 5 months I had "Next project TKPGP" in my footer, and I got
preaty far with it. I ran into problems supporting key generation. The
key problem (excuse the pun) was the way it used keyclicks and the time
between the keypress as well as the value of the keypress to generate a
truly random number for the seed in key creation. The method is
consistant in its ability to produce a truly random number, but doesn't
translate to Tcl/Tk, nor was I able to find a way to return control to
the user/program, and then take it back after completion.

Therefore, I stopped the project (cummon, it was a spare time thing, and
my wife gave birth about then, so spare time was out).

: Here, I open a pipe to write to PGP, and if I enter a bad password, at the
: shell level, PGP simply ask me to re-enter the password again. But in the
: above code, PGP just stay there and wait forever. If I use expect, I could
: catch the PGP's prompt for password and deal accordingly. Is there away that
: I can do without use expect?

I went with expect for all actual interaction with PGP. The reason was
twofold. First I was learning expect, and second - why recreate the wheel?

Best of luck Tim. And, if you find out how to solve the first problem
(that of keygeneration that uses PGPs method of generating a random seed,
rather than a psudo-random seed) please let me know.

jmi



Sat, 11 Jul 1998 03:00:00 GMT  
 tcl/tk as a front end for PGP ?
Has anyone written any tcl/tk as a PGP's shell? I am looking for any code
that provide an interface to PGP's command switches that let users
modify public/secret keys and decrypt/encrypt files. The problem I
encountered is that there is no way I can know that PGP reject a bad
passphrase (aka password). Take the code below for example:

## decrypt a file from stdin, and send output to stdout
proc pgp_decrypt {} {
    set f_decrypt [open "| /usr/local/bin/pgp -f " w]
    while {![eof stdin]} {
        set var [gets stdin]
        if {![eof stdin]} {
            puts $f_decrypt $var
        }
    }
    # wait for terminate
    flush $f_decrypt
    catch {close $f_decrypt}

Quote:
}

Here, I open a pipe to write to PGP, and if I enter a bad password, at the
shell level, PGP simply ask me to re-enter the password again. But in the
above code, PGP just stay there and wait forever. If I use expect, I could
catch the PGP's prompt for password and deal accordingly. Is there away that
I can do without use expect?

Thanks in advance for any help,
Tim



Sat, 11 Jul 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. tcl/tk as bash front end

2. People interested in programming FOR FREE a Tcl/Tk front-end

3. To make an easy TCL/TK front-end

4. Q: TCL/TK front end for Logo

5. Scheduler in pure Tcl (Tk front-end)?

6. Tcl/Tk front-end for GDB

7. tcl/tk front end for grass?

8. TkMH, a tk/tcl front-end to MH

9. : xmpeg, a Tk/Tcl front end to mpeg_play

10. tkmh - A Tcl/Tk front end for Rand mh MUA

11. Anyone have a Tk-front end to shelve

12. TclLDAP client w/Tk front end?

 

 
Powered by phpBB® Forum Software