diff --git a/src/crypto.mjs b/src/crypto.mjs
index 65d8066c68804ea238ce4600caf4f123d0c52499..f7c1fe38ba592b6e6eba257408e08fb32efce1ae 100644
--- a/src/crypto.mjs
+++ b/src/crypto.mjs
@@ -12,6 +12,8 @@ const sha256 = sha();
 
 const generateKeypair = nacl.sign.keyPair.fromSeed;
 
+export const isPubkey = (value) => /^[A-HJ-NP-Za-km-z1-9]{42,45}$/.test(value)
+
 export async function idSecPass2rawAll(idSec, pass) {
 	const rawSeed = await saltPass2seed(idSec, pass);
 	const keyPair = await seed2keyPair(rawSeed);
diff --git a/src/crypto.test.mjs b/src/crypto.test.mjs
index dea96c7b63302c2a8205e0dc405cbe755de85047..78e1feacfb6f419b701346d5c729539ef6602615 100644
--- a/src/crypto.test.mjs
+++ b/src/crypto.test.mjs
@@ -30,6 +30,7 @@ test('array sign string', async t => t.is((await app.sign(unsignedDocument, secr
 test('uint8array sign string', async t => t.is((await app.sign(unsignedDocument, secretKey, 'uint8array'))[0], 27));
 test('sign throw for bad output format', async t => t.throwsAsync(() => app.sign(unsignedDocument, secretKey, 'whattt ?')));
 
+test("is a pubkey", (t) => t.is(app.isPubkey(pubKey), true));
 test('b58 should decode/encode well', t => t.is(app.b58.encode(app.b58.decode(pubKey)), pubKey));
 test('b58 on pubKey with leading 1', t => t.is(app.b58.encode(app.b58.decode('12BjyvjoAf5qik7R8TKDJAHJugsX23YgJGi2LmBUv2nx')), '12BjyvjoAf5qik7R8TKDJAHJugsX23YgJGi2LmBUv2nx'));
 test('b58 on pubKey without leading 1', t => t.is(app.b58.encode(app.b58.decode('2BjyvjoAf5qik7R8TKDJAHJugsX23YgJGi2LmBUv2nx')), '2BjyvjoAf5qik7R8TKDJAHJugsX23YgJGi2LmBUv2nx'));