Black Hat Physical Device Security: Exploiting Hardware and Software

Appendix C: Factoring Source Code For Fun

Create text files for the following five files and copy their contents to those files. Open with Visual Studio 7.0 and compile. That's all you need to do. The code is self-explanatory and the program has a few command line switches to watch the calculations in real time.

Pfactor.cpp

<a name="750"></a><a name="page326"></a>/*      pfactor.cpp      PFactor v0.42a      Copyright (c) J. Drew Miller 1998-2005      (madfast@hushmail.com)      All Rights Reserved      Duplication and distribution or use of this program or code for anypurposes public or      private is denied. This code is available as example and no warrantyis    applied. This is      a work in progress and the output of this program should only betrusted if you can personally      validate the data.*/#include "stdafx.h"/*      Function Prototypes*/int FindRoot( ___int64 dNumber, bool fFactorAll, int level );/*      Global data*/bool gfVerbose = false;bool gfOptimize = true;bool gfIdentity = false;bool gfDumpUsage = false;/*      main      The program entry point.*/int ___cdecl main( int argc, char* argv[] ){<a name="751"></a><a name="page327"></a>/*            Do signon      */      printf( "\n\rPFactor v0.42a" ); ...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Vacuum Furnaces
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.