-- SPARQL ASK Queries re. Public Key Components -- When you copy and paste modulus from keystring you end up with spaces -- This query takes care of the problem via SQL built-in function used within SPARQL PREFIX : PREFIX xsd: ASK { :key [ :modulus ?m ; :exponent ?e ; ] . filter (str (?m) = sql:FOAF_MOD ("AD C1 C3 5A 90 04 D7 48 E5 ED CA 3E 4E 58 AD 6D D6 52 20 A4 12 BE D3 4D 85 0D A4 FC 7A 93 03 6D A4 E1 E6 64 7E 04 EE 0E 5A 09 CE 37 3D 0E F1 FC 39 33 50 A2 80 DB 29 D1 08 EB BF 7F 61 03 B5 92 7C D7 0F FE 89 F5 86 BF 60 E8 10 DC 5F 11 07 AB 9B AE DF 71 E1 7A 64 8F 24 B8 88 39 DC 1D 79 26 FB 6C BA FD 94 02 77 09 E9 56 28 4F 70 07 12 29 66 9F 02 D3 1E AB F6 EF 9E B1 74 43 27 F2 BD 77 F5 CB 90 26 83 90 05 C2 56 64 C9 B8 F6 93 EA 0E 81 9F 21 82 25 59 FB 42 B5 F3 81 B8 E4 30 1C 81 4E 23 C2 B6 C9 16 09 08 A4 77 6C 1D 5F 85 19 D3 25 EB 07 5A 67 B8 81 5F 52 C0 91 89 C2 50 15 8D 41 A9 56 D0 CF 79 9B 1F 79 E3 71 3F 77 BB D6 75 0E 45 69 20 DB 38 66 99 85 29 24 0D C0 0A 55 D9 4E 98 A0 2A AD B3 4A AF 6E D8 00 3D 05 5E 83 D6 52 D5 F6 73 66 98 D0 7B 8A 64 C7 7B AD 13 B6 61") && xsd:int(?e) = 65537) } -- SPARQL ASK where modulus has no spaces PREFIX : PREFIX xsd: ASK { :key [ :modulus "adc1c35a9004d748e5edca3e4e58ad6dd65220a412bed34d850da4fc7a93036da4e1e6647e04ee0e5a09ce373d0ef1fc393350a280db29d108ebbf7f6103b5927cd70ffe89f586bf60e810dc5f1107ab9baedf71e17a648f24b88839dc1d7926fb6cbafd94027709e956284f70071229669f02d31eabf6ef9eb1744327f2bd77f5cb9026839005c25664c9b8f693ea0e819f21822559fb42b5f381b8e4301c814e23c2b6c9160908a4776c1d5f8519d325eb075a67b8815f52c09189c250158d41a956d0cf799b1f79e3713f77bbd6750e456920db3866998529240dc00a55d94e98a02aadb34aaf6ed8003d055e83d652d5f6736698d07b8a64c77bad13b661"^^xsd:hexBinary; :exponent "65537"^^xsd:int; ] . } PREFIX : PREFIX xsd: ASK { :key [ :modulus "{modulus-hex}"^^xsd:hexBinary; :exponent "{exponent-int}"^^xsd:int; ] . } -- Specific Fingerprint Lookup PREFIX : PREFIX xsd: PREFIX opl: SELECT distinct ?s ?f WHERE { ?s opl:hasCertificate ?c . ?c opl:fingerprint ?f . filter (str (?f) = sql:FOAF_MOD ("4E 9B 8D 7D B2 1A A6 E6 4F 95 D1 73 67 8B F0 71 7D 5A C3 55") ) } -- Generic Fingerprint Lookup PREFIX : PREFIX xsd: PREFIX opl: SELECT distinct ?s ?f WHERE { ?s opl:hasCertificate ?c . ?c opl:fingerprint ?f . } ---- PREFIX : PREFIX xsd: ASK { :key [ :modulus ?m ; :exponent ?e ; ] . filter (str (?m) = sql:FOAF_MOD ("bc 6d c4 be c2 a8 9a 3b 72 cf 31 74 e6 a3 d9 89 7e bd fc e5 bb 43 39 4d 85 cf 1e ad e4 b1 a7 83 a5 7d 92 2c fc 55 b6 29 bf e7 bd 78 ad 35 a8 05 96 32 d0 36 a2 07 1e 21 a6 ba e5 e6 fb 14 39 66 09 01 2d 8c 8e c2 e9 38 43 77 5c 40 e5 99 22 1c 5a 37 60 40 42 a3 67 07 fe be 22 e7 32 34 a4 79 59 c0 9f d1 48 e7 ed eb 2e 68 eb a2 a5 73 1f d9 1b 35 e3 9f dc 17 e7 19 16 48 87 b7 16 fe 8f 0b 40 b1 9b d9 03 cf 68 70 6d 47 18 25 26 6e 93 bc 37 8f 80 2f ea 53 7e 1e d4 8c 0a 1f 55 dd e2 7c 7f e8 81 6a ea df 3d 4c 6a df 03 1c 65 6c 8e 11 82 4d 84 27 cc e2 ef 76 d4 65 94 67 28 1f a3 78 3b 8e fe 81 4d 40 77 92 b6 97 82 f4 30 ee 86 c3 cf 65 b3 0d 60 55 99 11 05 22 7c cc 33 aa eb 8e a0 a9 e7 77 f1 fa c0 30 af 76 d9 6a b4 22 4e 19 b8 2e 7e 3a 50 44 92 d6 73 9b 66 c1 0b ea 42 85") && xsd:int(?e) = 65537) } -- New WebID Spec Query PREFIX : PREFIX xsd: ASK { :key [ :modulus "bc6dc4bec2a89a3b72cf3174e6a3d9897ebdfce5bb43394d85cf1eade4b1a783a57d922cfc55b629bfe7bd78ad35a8059632d036a2071e21a6bae5e6fb14396609012d8c8ec2e93843775c40e599221c5a37604042a36707febe22e73234a47959c09fd148e7edeb2e68eba2a5731fd91b35e39fdc17e719164887b716fe8f0b40b19bd903cf68706d471825266e93bc378f802fea537e1ed48c0a1f55dde27c7fe8816aeadf3d4c6adf031c656c8e11824d8427cce2ef76d4659467281fa3783b8efe814d407792b69782f430ee86c3cf65b30d6055991105227ccc33aaeb8ea0a9e777f1fac030af76d96ab4224e19b82e7e3a504492d6739b66c10bea4285"^^xsd:hexBinary; :exponent "65537"^^xsd:int; ] . } -- Old WebID Spec Query PREFIX : PREFIX xsd: ASK { ?identity cert:identity . ?identity rsa:modulus ?m ; rsa:public_exponent ?e . } -- Old 2 PREFIX : PREFIX xsd: ASK { ?identity cert:identity . ?identity rsa:modulus "bc6dc4bec2a89a3b72cf3174e6a3d9897ebdfce5bb43394d85cf1eade4b1a783a57d922cfc55b629bfe7bd78ad35a8059632d036a2071e21a6bae5e6fb14396609012d8c8ec2e93843775c40e599221c5a37604042a36707febe22e73234a47959c09fd148e7edeb2e68eba2a5731fd91b35e39fdc17e719164887b716fe8f0b40b19bd903cf68706d471825266e93bc378f802fea537e1ed48c0a1f55dde27c7fe8816aeadf3d4c6adf031c656c8e11824d8427cce2ef76d4659467281fa3783b8efe814d407792b69782f430ee86c3cf65b30d6055991105227ccc33aaeb8ea0a9e777f1fac030af76d96ab4224e19b82e7e3a504492d6739b66c10bea4285"^^xsd:hexBinary ; rsa:public_exponent "65537"^^xsd:int . }