Author Topic: phatsig  (Read 14557 times)

0 Members and 2 Guests are viewing this topic.

Offline bushing

  • Senior Member
  • Needs to get outside.
  • *****
  • Posts: 119
  • props to my peeps
phatsig
« on: August 14, 2005, 01:31:53 am »
Since there is no longer any officially provided software to create .sig files to allow us to use our phatboxes without a Windows box, RobM and I took the liberty of creating our own.

http://downloads.phathack.com/bushing/phatsig.c
http://downloads.phathack.com/bushing/phatsig-linux-x86

Enjoy!
-b

Offline judb

  • Administrator
  • Veteran.
  • *****
  • Posts: 1329
  • ph4t l3wtz
Re: phatsig
« Reply #1 on: August 14, 2005, 03:16:01 am »
Oh yeah, you guys rock!

Offline Genesis

  • Getting the hang of things.
  • **
  • Posts: 83
  • Bite Me
Re: phatsig
« Reply #2 on: August 14, 2005, 03:24:01 am »
gcc -Wall -Ilibtomcrypt-1.06/src/headers/ -o phatsig phatsig.c libtomcrypt.a libtommath.a                     phatsig.c: In function `init_crypto':
phatsig.c:94: error: `ltm_desc' undeclared (first use in this function)
phatsig.c:94: error: (Each undeclared identifier is reported only once
phatsig.c:94: error: for each function it appears in.)

Doesn't compile - you're missing something....

Offline bushing

  • Senior Member
  • Needs to get outside.
  • *****
  • Posts: 119
  • props to my peeps
Re: phatsig
« Reply #3 on: August 14, 2005, 04:17:47 am »
Quote
gcc -Wall -Ilibtomcrypt-1.06/src/headers/ -o phatsig phatsig.c libtomcrypt.a libtommath.a                     phatsig.c: In function `init_crypto':
phatsig.c:94: error: `ltm_desc' undeclared (first use in this function)
phatsig.c:94: error: (Each undeclared identifier is reported only once
phatsig.c:94: error: for each function it appears in.)

Doesn't compile - you're missing something....


Did you download (and compile) libtomcrypt and libtommath?  Is libtomcrypt in ./libtomcrypt-1.06 (the argument to the -I parameter)?  It's defined in libtomcrypt-1.06/src/headers/tommath.h, which is included by headers/tomcrypt.h, which is included in the top of phatsig.c.

-b

Offline Genesis

  • Getting the hang of things.
  • **
  • Posts: 83
  • Bite Me
Re: phatsig
« Reply #4 on: August 14, 2005, 05:07:34 am »
Yep, sure did, and the header directory is there.

Note that the libraries are getting picked up (otherwise there'd be a LOT of errors)

The header you referenced is NOT in the directory referenced...

The definition IS, however, in libtomcrypt-1.06/src/headers/tomcrypt_math.h, which is included by libtomcrypt-1.06/src/headers/tomcrypt.h - but it won't be picked up as the predicate IFDEF is not set.

Is there a versioning problem here between the libraries I got and what I need?
« Last Edit: August 14, 2005, 05:23:02 am by Genesis »

Offline bushing

  • Senior Member
  • Needs to get outside.
  • *****
  • Posts: 119
  • props to my peeps
Re: phatsig
« Reply #5 on: August 14, 2005, 10:50:22 pm »
Quote
The header you referenced is NOT in the directory referenced...

The definition IS, however, in libtomcrypt-1.06/src/headers/tomcrypt_math.h, which is included by libtomcrypt-1.06/src/headers/tomcrypt.h - but it won't be picked up as the predicate IFDEF is not set.

Is there a versioning problem here between the libraries I got and what I need?


Grrr... good catch.  When playing with libtomcrypt, I made some changes to tomcrypt_custom.h -- these probably caused the problem.  

First, try #defining "LTM_DESC", to make that IFDEF  happy -- if that works, I'll update the code and reupload.  If not, I uploaded my copy of that file to the downloads site -- try replacing the stock version with that and see if that fixes it.

-b

Offline Genesis

  • Getting the hang of things.
  • **
  • Posts: 83
  • Bite Me
Re: phatsig
« Reply #6 on: August 15, 2005, 03:47:51 am »
Nope - defining it makes the compiler happy, but then you get a complaint from the linker, because it is still an external that has no definition elsewhere.

The "right way" to fix this is to put the definition in your source file 'ya know...  :)  If you can shoot me a diff in a PM I can test and report back; that way anyone else who grabs the libraries will be able to build it.

Offline bushing

  • Senior Member
  • Needs to get outside.
  • *****
  • Posts: 119
  • props to my peeps
Re: phatsig
« Reply #7 on: August 15, 2005, 05:12:00 am »
Quote
Nope - defining it makes the compiler happy, but then you get a complaint from the linker, because it is still an external that has no definition elsewhere.

The "right way" to fix this is to put the definition in your source file 'ya know...  :)  If you can shoot me a diff in a PM I can test and report back; that way anyone else who grabs the libraries will be able to build it.


Eh... it's a part of LTC, though. (See http://libtomcrypt.org/faq.txt for more info.)

I added the #define at the top of phatsig.c, and added the full instructions to build libtomcrypt with libtommath support -- wanna try downloading it again and compiling it?

-b

Offline Genesis

  • Getting the hang of things.
  • **
  • Posts: 83
  • Bite Me
Re: phatsig
« Reply #8 on: August 15, 2005, 12:14:19 pm »
Works!  ;D

Offline Cameron

  • A few posts under my belt.
  • *
  • Posts: 35
Re: phatsig
« Reply #9 on: August 16, 2005, 07:45:51 pm »
Bushing, you're a complete legend!

I have this built and running on Mac OS-X .. and while I haven't actually tried the signature files in my phatbox, I know they are byte identical to ones generated by:
 - The plsign.cgi web page
 - The plsign tool (for PPC) previously distributed by phatnoise
 - The phatsig tool running on my (Intel) Linux box

I'm pretty confident that it'll work.

I'll add this to PhatMac, and will soon have a new version for everyone (hopefully by the end of the week)..

Thanks again!

Cameron.
---
Cameron Silver
Visit the PhatMac website:
   http://www.buzzneon.com/PhatMac

Offline para

  • Senior Member
  • Veteran.
  • *****
  • Posts: 181
Re: phatsig
« Reply #10 on: August 20, 2005, 02:17:17 pm »
Wow, nice one!!!

I'll add this to Phat4X as one of the first next things! This saves me very much time researching and allows me to concentrate on bugs and features for Phat4X...


Para

Offline todd1010

  • Veteran.
  • ****
  • Posts: 346
  • 2005 Audi S4
Re: phatsig
« Reply #11 on: August 21, 2005, 04:42:05 am »
What does Phat4X do? Is it to replace the PMM? If so, when can we start using it?
todd1010 AT gmail DOT com

Offline Paul

  • Global Moderator
  • Needs to get outside.
  • *****
  • Posts: 137
Re: phatsig
« Reply #12 on: August 21, 2005, 07:55:25 pm »
Perhaps you should check out the entire area of the forum dedicated to phat4x.

http://forum.phathack.com/cgi-bin/yabb/YaBB.cgi#phatware


Offline S80_UK

  • Global Moderator
  • Veteran.
  • *****
  • Posts: 392
  • Volvo S80 D5 with VW Phatbox
    • Volvo Phatbox Installation
Re: phatsig
« Reply #13 on: August 21, 2005, 08:29:09 pm »
Hi,

But the forum on Phat4X doesn't actually tell a newbie like me what it is.  Now, I deduce that it's not an Australian beer( ;) ) , and I think it looks like it's a program which runs under Linux and is intended as a replacement for the software from Phatnoise themselves.  Right?

Les.  8)

Offline judb

  • Administrator
  • Veteran.
  • *****
  • Posts: 1329
  • ph4t l3wtz
Re: phatsig
« Reply #14 on: August 21, 2005, 10:10:58 pm »
I agree the naming is a little ambigious and we could stand to brush up the documentation some.. that will come with time.. Para's work on phat4x stopped for a while so when things get cooking again I am sure all will be made clear...

Phat4x should run on non linux platforms but i couldn't make it work on windows yet.  Hopefully with time it can become a true cross platform tool and a replacement for PMM on windows...

Offline STiDriver

  • A few posts under my belt.
  • *
  • Posts: 15
Re: phatsig
« Reply #15 on: August 22, 2005, 04:35:48 am »
I successfully compiled phatsig under Windows but when I tried to sign P0.m3u on my DMS I got a different sig than the existing p0.sig.  But the output from phatsig did match that of the cgi page.  Any ideas why the cgi & phatsig sigs don't match the existing?
« Last Edit: August 22, 2005, 05:31:19 am by STiDriver »

Offline Terry_Kennedy

  • Senior Member
  • Veteran.
  • *****
  • Posts: 253
  • There and back again
Re: phatsig
« Reply #16 on: August 22, 2005, 06:14:21 am »
Quote
I successfully compiled phatsig under Windows but when I tried to sign P0.m3u on my DMS I got a different sig than the existing p0.sig.  But the output from phatsig did match that of the cgi page.  Any ideas why the cgi & phatsig sigs don't match the existing?

I'm pretty sure that plsign uses a different signing key than PMM, which is a different key from the key that PhatNoise uses to sign the DMS and utilities. It should be possible to find the key that PMM uses (it has to be in the PMM code somewhere, and with the key prefix it should be possible to locate it) and add it as an option to phatsig.

Offline STiDriver

  • A few posts under my belt.
  • *
  • Posts: 15
Re: phatsig
« Reply #17 on: August 22, 2005, 02:33:47 pm »
phatsync.pl uses plsign to sign m3u files and this site http://jcs.org/ports/ lists plsign as: phatnoise phatbox playlist signing utility