Jump to content
Jagware
Starcat

Cd Encryption Via Skunkboard

Recommended Posts

Starcat    0

Hello folks!

 

After some experiments with the skunkboard and fixing my jagcd unit, I am now looking for an easy way to encrypt jagcds.

I know about the BJL based cd encryption, but it needs with a bjl cable (which requires a parallel port, that notebooks for example don't always have nowdays) or it needs a custom cable for xmodem transfer, which also requires a serial port that not all systems have now.

 

So the best solution in my opinion would be to use the skunkboard to encrypt cds and send the data using usb.

Now the BJL based encryption runs on the skunkboard it seems. However it would require code to send the encrypted data to the pc using usb.

 

So I was thinking maybe somebody of the jagware team can help?

Afterall there seem to be some people here who have experience with the cd encryption program and also the skunkboard.

 

Any help is very much appreciated.

 

Regards, Lars.

Share this post


Link to post
Share on other sites
SCPCD    0

Hi !

 

I don't know specification on the skunkboard to be used with the jagcd, but I think that it should be possible to patch the encryption code.

Is there the source code of the jag encryption part to download somewhere ?

Share this post


Link to post
Share on other sites
Orion_    1

yes because I patched it to use the BJL cable instead of the serial cable for the hash table upload using Zerosquare's bjl jag to pc upload routine

now, is there any example code that allow skunk to pc upload via usb cable in the jaguar side ?

or if you have an option from the skunk pc tool to download portion of memory of the jaguar, it can be easy too

I don't have a skunkboard so I don't know how it works

Share this post


Link to post
Share on other sites
Fadest    0

I have no clue about the CD encryption process and no CD player so I can't help, but manual and sources for the Skunkboard are here :

http://www.harmlesslion.com/cgi-bin/showpr...arch=skunkboard

 

As there is a kind of white board between PC & Jaguar for debugging if I remember correctly, Jaguar may be able to send datas to PC...

Share this post


Link to post
Share on other sites
SebRmv    2

Hi Starcat,

 

I already played a bit with skunkboard & communication via USB (I did a simple remote file system).

I may be able to help you hack the source of the BJL version of the encryption process thus.

 

Cheers

 

& happy birthday a little bit late ;)

Share this post


Link to post
Share on other sites
Starcat    0
Hi Starcat,

 

I already played a bit with skunkboard & communication via USB (I did a simple remote file system).

I may be able to help you hack the source of the BJL version of the encryption process thus.

 

Cheers

 

& happy birthday a little bit late ;)

 

Thank you very much :-)

 

Also thanks a lot for offering your help. Personally I didn't get very far yet, so your help is very much appreciated. :-)

Do you know if the data sent back to pc can be written to a file? or just the console window?

If you want to discuss this privately, I'm happy to talk via PM or e-mail :-)

I think it would really help the community to have a usb based encryption approach.

 

Regards, Lars.

 

 

Share this post


Link to post
Share on other sites
SebRmv    2
Thank you very much :-)

 

Also thanks a lot for offering your help. Personally I didn't get very far yet, so your help is very much appreciated. :-)

Do you know if the data sent back to pc can be written to a file? or just the console window?

If you want to discuss this privately, I'm happy to talk via PM or e-mail :-)

I think it would really help the community to have a usb based encryption approach.

 

Regards, Lars.

 

No problem to discuss about this on this forum.

 

My modified version of JCP emulates all system calls related to files, so that I have a standard interface on the Jaguar side to access files on my PC (running linux).

This thus includes writing files.

 

I had a quick look to the encryption program (modified by Mathias Domin to run on BJL) and I think it should not be too difficult.

The main "difficulty" is to split big transfers into small ones, because Skunkboard may transfer blocks of data of about at most 4ko at once.

(so for bigger blocks, just split them into 4k blocks and take care)

 

I think it would probably be a good idea that the encryption process works on the original JCP version of Tursi (ie not on my modified version).

If I remember correctly, it should be possible to write files with it. (I will double check that)

However, I fear that there is a limitation over the size of the files (typically limited to one 4ko block).

Is it sufficient for the encryption key? What is its standard size?

 

 

 

Share this post


Link to post
Share on other sites
Starcat    0

I don't exactly remember the size of the hashtable data, but it was rather small I think. I am not sure, but I would assume even 4K is enough.

It is later padded to 1MB when you burn it to cd.

 

Share this post


Link to post
Share on other sites
SebRmv    2

I hacked a bit the BJL version of Matthias and need to do some tests now (cross the fingers :D)

 

If this works well, I will release the source code as well as the cof file.

 

Cheers

 

Share this post


Link to post
Share on other sites
SebRmv    2

Unfortunately, I don't have at home the required hardware to test my skunkboard version of the encryption process.

If anyone is volunteer to test it, I'll be happy to send the cof file.

Otherwise, I'll wait to get hands on a stock JagCD unit (I only have my dev JagCD at home, and it does not seem to work with a stock Jaguar)

 

 

 

Share this post


Link to post
Share on other sites
Starcat    0

I'd be happy to test it for you :-)

Share this post


Link to post
Share on other sites
SebRmv    2

Thanks Starcat for all your help this night.

 

I'll try to debug my code and I'll drop a message here when I have something that (may) work.

 

 

 

Share this post


Link to post
Share on other sites
Starcat    0

No problem. :)

If you want me to test another binary, just send it to me and I'll let you know. :)

Share this post


Link to post
Share on other sites
SebRmv    2

I have checked my transfer code and this seems to work well.

Too bad I haven't my stock JagCD unit with me so that I can go further into my investigations.

Share this post


Link to post
Share on other sites
SebRmv    2

Just attached two versions of the encryption process: one uses uart/xmodem for transfers (this should correspond to original Matthias version), the other uses the SkunkBoard.

 

Could you test both please and tell me the results?

 

(as usual launch the skunkboard version with "jcp -c")

cden16.zip

Share this post


Link to post
Share on other sites
Starcat    0

It still writes the same data to the file. It's the pattern: It's C0 D0 AD E0. repeated for a more or less random file size between 30-70k depending on the try.

After a few tries it didn't create a file anymore.

 

However on the pc side it closes the command window and on the jag side it goes to a dark blueish/greenish screen.

 

 

 

Share this post


Link to post
Share on other sites
Starcat    0

I just did a few tests myself using the transfer code and it should be fine.

My only guess is, something is messing up the data before tranfser.

Maybe it's the uart code causing trouble, maybe it's something skunk related causing trouble with the jag cd (although I doubt this, as the rest of the program seems to run fine)...

 

can anybody test if the data using the xmodem cable is correct or corrupted as well?

Share this post


Link to post
Share on other sites
SebRmv    2
I just did a few tests myself using the transfer code and it should be fine.

My only guess is, something is messing up the data before tranfser.

Maybe it's the uart code causing trouble, maybe it's something skunk related causing trouble with the jag cd (although I doubt this, as the rest of the program seems to run fine)...

 

can anybody test if the data using the xmodem cable is correct or corrupted as well?

 

 

There should not be any interactions with the UART code, since it is completely deactivated.

 

I tried apart the transfer code and it works well. So this can only be a bad interaction between either the JagCD and the skunk or between the encryption code and the skunk library.

 

 

Share this post


Link to post
Share on other sites
Orion_    1
It still writes the same data to the file. It's the pattern: It's C0 D0 AD E0. repeated for a more or less random file size between 30-70k depending on the try.

you should have a few data at the beginning of the file depending on how much track you have on cd, then the rest of the file is using this pattern for any cd hash table

 

 

Share this post


Link to post
Share on other sites
SebRmv    2
you should have a few data at the beginning of the file depending on how much track you have on cd, then the rest of the file is using this pattern for any cd hash table

 

Ok, interesting.

 

So how long is the file starcat? Is it about 130 kb long?

Share this post


Link to post
Share on other sites
Starcat    0

No it's rather small. the biggest was like 70k, mostly like 40k though.

However this latest binary doesn't seem to write a file anymore...

 

There is one thing that came to my mind.. in the skunk lib it says, no of the commands are "thread safe" (see skunk.s)... Means, maybe the code is messing something up regarding the encryption tool or the data? Just an idea.

 

Now that I think about it, this new binary you posted (the one for the skunk), behaves strange compared to previous ones.

Sometimes it closes the console, sometimes it used to create a file (but maybe that was just luck?) and now when I try it, it ends with a bright green screen on the jag side after the calculations and no response on the pc side, waiting for the 68k to handshake with the console, as if the jag crashed or so

 

What did you modify to previous versions?

Share this post


Link to post
Share on other sites
SebRmv    2
No it's rather small. the biggest was like 70k, mostly like 40k though.

However this latest binary doesn't seem to write a file anymore...

 

There is one thing that came to my mind.. in the skunk lib it says, no of the commands are "thread safe" (see skunk.s)... Means, maybe the code is messing something up regarding the encryption tool or the data? Just an idea.

 

Now that I think about it, this new binary you posted (the one for the skunk), behaves strange compared to previous ones.

Sometimes it closes the console, sometimes it used to create a file (but maybe that was just luck?) and now when I try it, it ends with a bright green screen on the jag side after the calculations and no response on the pc side, waiting for the 68k to handshake with the console, as if the jag crashed or so

 

What did you modify to previous versions?

 

Almost nothing was modified. I just moved a bit the code to gather all the skunkboard related code.

I also added two skunkNOP.

 

Well, that's very strange. I will contact Matthias to ask him whether I interpreted correcly his code.

 

Share this post


Link to post
Share on other sites
Tursi    0

My first thought:

 

During the encryption, I imagine you have to activate the JagCD memory space (otherwise you wouldn't need it!). When you access the Skunkboard, do you switch the cartridge space back in?

 

Share this post


Link to post
Share on other sites
SebRmv    2

I did not look at the details of the encryption process.

 

I have tested quickly and it happens that the Jag cannot synchronize with the PC (SkunkRESET fails)

or fails during the transfer.

 

Maybe you are right, regarding memory space. What should I do then?

Do you want the source file of my current mod?

 

Share this post


Link to post
Share on other sites
Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoticons maximum are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×