Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for XML Signatures #14

Open
JDziurlaj opened this issue Jan 8, 2019 · 1 comment
Open

Support for XML Signatures #14

JDziurlaj opened this issue Jan 8, 2019 · 1 comment

Comments

@JDziurlaj
Copy link
Collaborator

XML Signatures can provide assurances that the ballot was not modified in transit, and that it comes from the election jurisdiction. However, because the voter's selections are currently stored in nodes covered by the XML signature, it will become invalid as soon as the voter marks the ballot. A workaround is to place the selections under datasets/data, but as a different tag, i.e. selections instead of eml. This has the side benefit of making the EML instance more conformant with the OASIS version.

@JDziurlaj
Copy link
Collaborator Author

There is a very strange bug in Adobe's XML Data Signatures support. If the target of a manifest includes an "Id" element, the correct transform will not run.

<Reference URI="#410">
	<Transforms>
		<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"/>
	</Transforms>
	<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
	<DigestValue>6LIx9NZKzbyFXC+qOW/n9bo0RS8=</DigestValue>
</Reference>

If I remove the Id attribute from the Data DOM, it works

<Reference URI="">
	<Transforms>
		<Transform Algorithm="http://www.w3.org/2002/06/xmldsig-filter2">
			<XPath Filter="intersect" xmlns="http://www.w3.org/2002/06/xmldsig-filter2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">here()/ancestor::dsig:Signature[1]/../../RBM[1]//. | 
here()/ancestor::dsig:Signature[1]/../../RBM[1]//@* | 
here()/ancestor::dsig:Signature[1]/../../RBM[1]//namespace::*</XPath>
		</Transform>
		<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"/>
	</Transforms>
	<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
	<DigestValue>...</DigestValue>
</Reference>
<signData target="ballot_stub" ref="$data.signatures">
	 <manifest>
			<ref>$data.RBM</ref>
	 </manifest>
</signData>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant