Driver Signing Notes

I recently wanted to sign some drivers to avoid requiring users of my ChipWhisperer device to do the usual bypass-signature deal. The end result is a sweet sweet screen like this when install the drivers:

usbsig

If you are in this situation, I wanted to add some of my own notes into the mix.

David Grayson has an awesome guide which I mostly followed, available at http://www.davidegrayson.com/signing.

The steps I followed (again from his guide basically) are:

  1. Buy a Code Signing Certificate, I selected one from GlobalSign. They will verify your company information as part of this (or name if person) which basically involves calling you.
  2. Download the certificate. You can then double-click on it to install it into your system (hint: you may want to dedicate a VM or machine to this to keep your certificate off your laptop you travel with for example).
  3. You need the ‘signtool’ and ‘inf2cat’ programs. This requires install Windows SDK + Windows WDK (which itself depends on Visual Studio 2013). There’s like 10GB of other crap you install in order to get these files. Anyway install them…
  4. Write the following in a batch file:
    "C:\Program Files (x86)\Windows Kits\8.1\bin\x86\inf2cat" /v /driver:%~dp0 /os:XP_X86,Vista_X86,Vista_X64,7_X86,7_X64,8_X86,8_X64,6_3_X86,6_3_X64
    "C:\Program Files (x86)\Windows Kits\8.1\bin\x86\signtool" sign /v /n "Your Company Name Inc." /tr http://timestamp.globalsign.com/scripts/timestamp.dll *.cat
    "C:\Program Files (x86)\Windows Kits\8.1\bin\x86\signtool" sign /v /n "Your Company Name Inc." /tr http://timestamp.globalsign.com/scripts/timestamp.dll /fd SHA256 /as *.cat
    pause
    
  5. Copy the batch file to the directory with the .inf file, and double-click it.
  6. You might need to modify your .INF file, check the output for errors – I had to update the date to be past 2013 for example. The above will work if you’ve installed the certificate on your system, as it will search for a certificate with “Your Company Name Inc.”, so you need to match that exactly.
  7. Party – you should now have a signed .cat file! Distribute the whole batch (be sure to remove the .bat file) to your customers/users.

The batch file I use above signs both a SHA1 and SHA256 signature. SHA1 is being deprecated due to collision attacks (interesting sidenote: these were used as part of the attack on Iranian centrifuges by creating digitally signed drivers).

Unfortunately SHA256 isn’t fully supported across all platforms you might need to support (see https://support.globalsign.com/customer/portal/articles/1499561-sha-256-compatibility), so for now I’m using both, which I think works?

New Site Layout Live

For some time I’ve been planning on updating my website design. Ultimately I want to move towards more blog posts and less static pages, this is the result. This should help showing some of my projects and videos off a little easier. The old site will remain accessible at http://www.colinoflynn.com/oldsite as I haven’t migrated everything.

In addition this means old links can easily be fixed by inserting ‘oldsite’ into them! I.e. if you have a link to http://colinoflynn.com/tiki-index.php?page=15dot4tools, just change it to http://colinoflynn.com/oldsite/tiki-index.php?page=15dot4tools and everything works!

Let me know if anything breaks though, but in the mean-time I’ll be slowly trying to migrate additional content.

SMD Solder Paste Stencil Creation with Silhouette Cameo

I made some additional details in a long YouTube movie:

This is far from the first blog post on this, but I wanted to write down exactly what I did to get this working on Windows 7, 64-bit with as little fussing as possible.

1. Buy Silhouette Cameo

2. Decide on material. I originally used the Transparency Film but it’s a little thick, so instead ended up finding that you can buy 3 Mil drafting file individually from art stores.

3. Install USB drivers from CD that came with system – this seems to be required, as installing the software from the website alone wasn’t enough. If you need them I’ve mirrored a copy here.

4. Plug in Cameo device. Check if it appears as a printer:

Image
If it DOES NOT, screw around with drivers. For me it appeared as “USB Printer Support” for a while, you’ve got to try updating the drivers and forcing it to use the ones from the CD it seems. Eventually you should have success.

5. Share the Cameo device under “Printer Properties”:

Image

6. Install gerbv

7. Install pstoedit 64-bit or pstoedit 32-bit as appropriate

8. Install Ghostscript 64-bit or Ghostscript 32-bit as appropriate

9. Download copy of gerber2graphtec repo, unzip it somewhere. I’ve linked to my fork of the repo which contains some extra stuff, so if you want the original check the gerber2graphtec pmonta repo

10. Run the GUI. You’ll need to modify paths probably, or at least version numbers. Set the folder share option to match your computer name / printer share:

Image

11. If you haven’t loaded the Cameo before, basically check out the booklet that came with it. Set the cutting depth to ‘1’ on the blade and shove it into the machine. Peel back the blue sheet off the ‘cutting mat’, and stick the transparency to the mat.

12. Load a test gerber, convert it (check the output of the command line doesn’t have errors), and send onward! For me things ‘just worked’.

13. You can use the generate test square feature I added to generated the test pattern. Forces increase from 1 to 30 as it draws the squares.

Rigol DP832 Review

The majority of the review is available in movie format:

I purchased a Rigol DP832 power supply from RAE Electronics (local supplier). I had a chance to play around with it and wanted to leave a bit of a review.

To begin, I also bought some useful accessories. I got them from Digikey, and here are the part numbers:

  • Test Leads: Ponoma B-24-x, where x changes for color
  • Aligator Clips: Digikey 461-1208-ND
  • Minigrabbers: Ponoma 4723-0 / 4723-2

I think those are the most useful accessories to get. Buy at least 4 supply cables, maybe more as if you want to have +/- supplies it’s nice to have a colour for ‘0v’.

I ended up making a GUI, which is available at: https://github.com/colinoflynn/dp832-gui :
Image

 

Hackaday Project and Latest Circuit Cellar Columns

I had entered my side channel analysis project called ChipWhisperer into the Hackaday Prize. I’m honoured to have been selected as one of five finalists! This means lots more work getting everything ready, but should be exciting.

Since my last post, I’ve also published a few more columns in Circuit Cellar. If you aren’t familiar with my Programmable Logic in Practice column, I post some details of it on my dedicated website. I just posted a video for the Dec 2014 column which includes some experiments with metastability on the Xilinx FPGA. Fun times!

PicoScope 2204A Review

Image

I’ve been spending some time with a low-cost PicoScope device, and wanted to give a review in case you’re looking at one. To begin with, you can check out my Circuit Cellar Articles about selecting a scope.

There’s also a video version of this:

Introducing the 2200 Range

PicoTech’s 2200 range is a compact oscilloscope, if you want all the details check out The PicoTech Website. Presumably you’re interested in my hands-on experience instead though, so I won’t duplicate everything there.

Continue reading PicoScope 2204A Review

EELive! (ESC) Conference Slides + Programs

See my presentation at EELive? If so you can download the slides from:
http://www.newae.com/files/ThinkFastFPGADesignUsing_OFlynn.pdf

And the ISE + Vivado HLS Project from:
http://www.newae.com/files/ThinkFast_FPGA_Files.zip.

You can also check out additional details at the Programmable Logic in Practice post, which includes videos + examples of other uses of HLS.

Splitting of NewAE & ColinOflynn.com

Since 2001 I’ve used NewAE.com as my personal domain. I’ve decided to instead move my personal content (blog, various wiki articles, etc) to ColinOFlynn.com. Any old links to NewAE.com will work by simply replacing ‘newae.com’ with ‘colinoflynn.com’, as I’ve mirrored all (I think) the content.

In the mean-time there will be a redirection page to inform you that NewAE.com will contain mostly some products I’m involved with, and instead you should head to ColinOFlynn.com for the old content.