OpeTimestampsCliet
Commad-lietooltocreateadvalidatetimestampproofswiththeOpeTimestampsprotocol,usigtheBitcoiblockchaiasatimestampotary.AdditioallythispackageprovidestimestampigofPGPsigedGitcommits,adverificatiooftimestampsforbothGitcommitsasawhole,adidividualfileswithiaGitrepository.
RequiremetsPytho3WhileOpeTimestampscacreatetimestampswithoutalocalBitcoiode,toverifytimestampsyoueedalocalBitcoiCoreode(apruedodeisfie).
IstallatioEitherviaPyPi:
$pip3istallopetimestamps-clietorfromsource:
$pytho3setup.pyistallODebia(Stretch)youcaistalltheecessarysystemdepedecieswith:
sudoapt-getistallpytho3pytho3-devpytho3-pippytho3-setuptoolspytho3-wheelUsageCreatigatimestamp:
$otsstampREADME.mdSubmittigtoremotecaledarhttps://a.pool.opetimestamps.orgSubmittigtoremotecaledarhttps://b.pool.opetimestamps.orgSubmittigtoremotecaledarhttps://a.pool.eteritywall.comYou'llseethatREADME.md.otshasbeecreatedwiththeaidofthreeremotecaledars.Weca'tverifyitimmediatelyhowever:
$otsverifyREADME.md.otsAssumigtargetfileameis'README.md'Caledarhttps://alice.btc.caledar.opetimestamps.org:PedigcofirmatioiBitcoiblockchaiCaledarhttps://bob.btc.caledar.opetimestamps.org:PedigcofirmatioiBitcoiblockchaiCaledarhttps://fiey.caledar.eteritywall.com:PedigcofirmatioiBitcoiblockchaiIttakesafewhoursforthetimestamptogetcofirmedbytheBitcoiblockchai;we'reotdoigoetrasactiopertimestamp.
However,theclietdoescomewithaumberofexampletimestampswhichyoucatryverifyigimmediately.Here'sacompletetimestampthatcabeverifiedlocally:
$otsverifyexamples/hello-world.txt.otsAssumigtargetfileameis'examples/hello-world.txt'Success!Bitcoiblock358391attestsexisteceasof2015-05-28CESTYoucaspecifyJSON-RPCcredetials(USERadPASS)foralocalbitcoiodelikeso:
$ots--bitcoi-odehttps://USER:PASS@127.0.0.1:8332/verifyexamples/hello-world.txt.otsAssumigtargetfileameis'examples/hello-world.txt'Success!Bitcoiblock358391attestsexisteceasof2015-05-28CESTIcompletetimestampsareoesthatrequiretheassistaceofaremotecaledartoverify;thecaledarprovidesthepathtotheBitcoiblockheader:
$otsverifyexamples/icomplete.txt.otsAssumigtargetfileameis'examples/icomplete.txt'Got1ewattestatio(s)fromhttps://alice.btc.caledar.opetimestamps.orgSuccess!Bitcoiblock428648attestsexisteceasof2016-09-07CESTTheclietmaitaisacacheoftimestampsitobtaisfromremotecaledars,soifyouverifythesamefileagaiit'llusethecache:
$otsverifyexamples/icomplete.txt.otsAssumigtargetfileameis'examples/icomplete.txt'Got1attestatio(s)fromcacheSuccess!Bitcoiblock428648attestsexisteceasof2016-09-07CESTYoucaalsoupgradeaicompletetimestamp,whichaddsthepathtotheBitcoiblockchaitothetimestampitself:
$otsupgradeexamples/icomplete.txt.otsGot1attestatio(s)fromcacheSuccess!TimestampiscompleteFially,youcagetiformatiooatimestamp,icludigtheactualcommitmetoperatiosadattestatiosiit:
$otsifoexamples/two-caledars.txt.otsFilesha256hash:efaa174f68e59705757460f4f7d204bd2b535cfd194d9d945418732129404ddbTimestamp:apped839037eef449dec6dac322ca97347c45sha256->apped6b4023b6edd3a0eeeb09e5d718723b9esha256preped57d46515appedeadd66b1688d5574verifyPedigAttestatio('https://alice.btc.caledar.opetimestamps.org')->appeda3ad701ef9f10535a84968b5a99d8580sha256preped57d46516apped647b90ea1b270a97verifyPedigAttestatio('https://bob.btc.caledar.opetimestamps.org')TimestampigadVerifyigPGPSigedGitCommitsSeedoc/git-itegratio.md
PrivacySecurityTimestampigiheretlyrecordspotetiallyrevealigmetadata:thecurrettime.Ifyoucreatemultipletimestampsiclosesuccessioit'squitelikelythataadversarywillbeabletolikthosetimestampsasrelatedsimplyothebasisofwhetheywerecreated;ifyoumakeuseofthetimestampmultiplefilesioecommadfuctioality(./otsstamp<file1><file2>...<fileN>)mostofthecommitmetoperatiosithetimestampsthemselveswillbeidetical,providigaadversaryverystrogevidecethatthefilesweretimestampedbythesameperso.Fially,theRESTAPIusedtocommuicatewithremotecaledarsdoes'tcurretlyattempttoprovideayprivacy,althoughitcouldbemodifiedtodosoithefuture(e.g.withprefixfilters).
Filecotetsareprotectedwithoces:aremotecaledarlearsothigaboutthecotetsofaythigyoutimestampasitolyeverreceivesaopaqueadmeaiglessdigest.Equally,ifmultiplefilesaretimestampedatoce,eachfileisprotectedbyaidividualoce;thetimestampforoefilerevealsothigaboutthecotetsofaotherfiletimestampedatthesametime.
CompatibilityExpectatiosOpeTimestampsisalphasoftware,soit'spossiblethattimestampformatsmayhavetochageithefutureio-backward-compatibleways.Howeveritwillalmostcertailybepossibletowritecoversiotoolsforayo-backwards-compatiblechages.
It'sverylikelythattheRESTprotocolusedtocommuicatewithremotecaledarswillchage,icludigibackwardsicompatibleways.Ifthishappesyou'lljusteedtoupgradeyourcliet;existigtimestampswillbeuaffected.
CaledarMirrorigAsashort-termmeasure,therawcaledardataforthethreecaledarserversioperatioatthistimecabedowloadeddirectly.Seethecotrib/caledar-mirror.shscriptfordetails.
DevelopmetUsethesetuptoolsdevelopmetmode:
pytho3setup.pydevelop--userKowIssuesNeeduittestsforthecliet.
Gittreere-hashigsupportfailsocertaifileameswithivaliduicodeecodigs;thisappearstobeduetobugsitheuderlyigGitPytholibrary.Asawork-aroud,youmayfidthecovmvtoolusefultofidadreamethesefiles.
GitaexsupportolyworkswiththeSHA256adSHA256Ebackeds.
ErrorsitheBitcoiRPCcommuicatioare'thadlediauser-friedlyway.
NotallPythoplatformscheckSSLcertificatescorrectly.Thismeasthatosomeplatforms,itwouldbepossibleforaMITMattackertoiterceptHTTPScoectiostoremotecaledars.Thatsaid,itshould'tbepossibleforsuchaattackertodoaythigworsethagiveusatimestampthatfailsvalidatio,aeasilyfixedproblem.
ots-git-gpg-wrapperdoes'tyetcheckforyouifthetimestampothegitcommitmakessese.
bitcoipackagecacauseissues,withotscofusigitwiththerequiredpytho-bitcoilibpackage.AsymptomofthisissueisthemessageAttributeError:module'bitcoi'hasoattribute'SelectParams'orJSONDecodeError("Expectigvalue",s,err.value)fromNoe.Toremedythisissue,oemustdothefollowig:
#uistallthepackagesthroughpippip3uistallbitcoipytho-bitcoilib#removethebitcoidirectorymauallyfromyourdist-packagesfolderrm-rf/usr/local/lib/pytho3.5/dist-packages/bitcoi#reistalltherequiredpackagepip3istallpytho-bitcoilib






评论