Google/Tink: How use public key to verify signature











up vote
1
down vote

favorite












We want to use the Tink library in our project to be able to verify some incoming signatures given a public key.



What we have are the following:




  1. The public key as a string

  2. The signature itself

  3. The plaintext


After going through Tink's documentation, we cannot figure out how to load the public key string so that it can be used by PublicKeyVerifyFactory.



Has anybody done anything similar? Have you found any examples online that could point us to the right direction?










share|improve this question
























  • have you tried storing the public key in the export JSON format and trying to load it using CleartextKeysetHandle.read?
    – Jos Angel George
    Nov 9 at 19:04










  • There is not a single public key format, so to answer the question fully it is required to publish the public key.
    – Maarten Bodewes
    Nov 10 at 0:34















up vote
1
down vote

favorite












We want to use the Tink library in our project to be able to verify some incoming signatures given a public key.



What we have are the following:




  1. The public key as a string

  2. The signature itself

  3. The plaintext


After going through Tink's documentation, we cannot figure out how to load the public key string so that it can be used by PublicKeyVerifyFactory.



Has anybody done anything similar? Have you found any examples online that could point us to the right direction?










share|improve this question
























  • have you tried storing the public key in the export JSON format and trying to load it using CleartextKeysetHandle.read?
    – Jos Angel George
    Nov 9 at 19:04










  • There is not a single public key format, so to answer the question fully it is required to publish the public key.
    – Maarten Bodewes
    Nov 10 at 0:34













up vote
1
down vote

favorite









up vote
1
down vote

favorite











We want to use the Tink library in our project to be able to verify some incoming signatures given a public key.



What we have are the following:




  1. The public key as a string

  2. The signature itself

  3. The plaintext


After going through Tink's documentation, we cannot figure out how to load the public key string so that it can be used by PublicKeyVerifyFactory.



Has anybody done anything similar? Have you found any examples online that could point us to the right direction?










share|improve this question















We want to use the Tink library in our project to be able to verify some incoming signatures given a public key.



What we have are the following:




  1. The public key as a string

  2. The signature itself

  3. The plaintext


After going through Tink's documentation, we cannot figure out how to load the public key string so that it can be used by PublicKeyVerifyFactory.



Has anybody done anything similar? Have you found any examples online that could point us to the right direction?







java cryptography digital-signature public-key tink






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 9 at 17:33

























asked Nov 9 at 15:18









Alex

6,10973143




6,10973143












  • have you tried storing the public key in the export JSON format and trying to load it using CleartextKeysetHandle.read?
    – Jos Angel George
    Nov 9 at 19:04










  • There is not a single public key format, so to answer the question fully it is required to publish the public key.
    – Maarten Bodewes
    Nov 10 at 0:34


















  • have you tried storing the public key in the export JSON format and trying to load it using CleartextKeysetHandle.read?
    – Jos Angel George
    Nov 9 at 19:04










  • There is not a single public key format, so to answer the question fully it is required to publish the public key.
    – Maarten Bodewes
    Nov 10 at 0:34
















have you tried storing the public key in the export JSON format and trying to load it using CleartextKeysetHandle.read?
– Jos Angel George
Nov 9 at 19:04




have you tried storing the public key in the export JSON format and trying to load it using CleartextKeysetHandle.read?
– Jos Angel George
Nov 9 at 19:04












There is not a single public key format, so to answer the question fully it is required to publish the public key.
– Maarten Bodewes
Nov 10 at 0:34




There is not a single public key format, so to answer the question fully it is required to publish the public key.
– Maarten Bodewes
Nov 10 at 0:34

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53228475%2fgoogle-tink-how-use-public-key-to-verify-signature%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53228475%2fgoogle-tink-how-use-public-key-to-verify-signature%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Schultheiß

Verwaltungsgliederung Dänemarks

Liste der Kulturdenkmale in Wilsdruff