From c56b2790a3a3d022acbf216052e29c432dd765a4 Mon Sep 17 00:00:00 2001 From: LucasVerdelho Date: Tue, 19 Mar 2024 21:58:36 +0000 Subject: [PATCH] Questoes do TP5 --- TPs/TP05/Images/Q1.png | Bin 0 -> 22373 bytes TPs/TP05/Readme.md | 56 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 TPs/TP05/Images/Q1.png create mode 100644 TPs/TP05/Readme.md diff --git a/TPs/TP05/Images/Q1.png b/TPs/TP05/Images/Q1.png new file mode 100644 index 0000000000000000000000000000000000000000..f0eb8969f3b99fff1c236034eae26b3b8ea18456 GIT binary patch literal 22373 zcmdpebzIczx-T{eQUZbsNQu%VNGsha-7Q@LN=O(;r$~#VARr~33P?x@2sngvw{*iW zbDzPz*4}5IeeOMf-}&egXN@zzdE*He6*e~`1n1g4#9V*0qk?d77=xMLdbm_ycg;$Ji^h3caY(C34S(wR9S-?%Ji^63 zSwI<;h5cqYICsqMW?;WHJc7?8vi$jpG0snK5q_*+o9eZT6Y`g8F52JR+!RNxHJH9U==LbC!*8RNd1Vaa$bIUChYtUfGUhlT z`1lrXf@0qhR{k5itv9U9~ zpC4a@w;rf?C|STnP1w9u5=&fPw2$g%X0AO?Y5Kg8I48tQWO;aBK~Ilm*J>{7Q+Icc zBBg4J!zKdbNxn?CzM1?Y+_v<)ZE5wu+LFg>Re=+qayH>3dwP0Il!@(!);U8=6AXM* z^z;^q#M!*X_?!Itt=dv&MQQA%BHxE!5$Nen@-IKA(nId;g?l);g-&sgZ8h?_tKESi zlg}z?tT30ouMqMEEy!)^=wP?2`}BcdmIliLLMvzacjYFE_Ei+q8nuJ)tHeZ-6%~YO zf@uC~pKWo4Ho@73%1zpJd>b3bNs5G|BGirrv$%ZP*phng9ZI2;KHJi6(s?4yf?pL4 zB$x-eT0@^#sUvS2hpQ9Z*CJChkdSj2@jXB^1$b49F{_NxXCTj)Tb8M`G4F?Dcl>XACK+ad&aIE*=pOQnY+{bYb)-Y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(d~vGkFg9o<*A{!O6oL#_EC#I}RKNAzr|}Q7E9E-REDBp+B;&TTGVID08oTeHXM%Sf^Gd zR1VWfp4f-S5QtaYwOejN@K&m+>6{L1w33|XHK4lp9#~wR)pb%CVyk8m!i5=f$z?tu zzk11j5XgQEH3cuQA+36sf5*j38T|0mlcp*EXFqlDm)X{avvYdOl5CO#o<~p^<*rS> z9 zCHuf>jTY)TRaI`1R@Dj?i7%lRsSmb;~}Ashd$*;f}_+T;9g| za&jG;b2xta^|xMxqhc z6}jWNd@}r((O@Ze`3LJS;0(Pd`pQ4MEwPp8$!5{*;KCIf-w3B%7TC3UqMeVJm4)s3 J5_9*+{{kRF?r#79 literal 0 HcmV?d00001 diff --git a/TPs/TP05/Readme.md b/TPs/TP05/Readme.md new file mode 100644 index 0000000..7731a19 --- /dev/null +++ b/TPs/TP05/Readme.md @@ -0,0 +1,56 @@ +# Respostas das Questões +## Q1 + +Para verificar que as chaves fornecidas constituem um par RSA valido, podemos extrair a chave publica do certificado e da chave privada (separadamente) e verificar se a chave publica é igual à chave publica extraída da chave privada. + +[Verificação da chave publica]() + +## Q2 +Utilizando o comando `openssl x509 -text -noout -in xxx.cert` podemos visualizar o conteúdo do certificado. Correndo o comando para o certificado `ALICE.crt` obtemos o seguinte resultado: + +```bash + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 08:f8:5a:5f:c9:e6:a2:a1:bc:b2:71:6b:7c:d7:be:b1:a8:89:f0:2b + Signature Algorithm: sha256WithRSAEncryption + Issuer: C = PT, ST = Minho, L = Braga, O = Universidade do Minho, OU = MSGS, CN = Entidade Certificadora, pseudonym = EC + Validity + Not Before: Mar 8 21:39:38 2024 GMT + Not After : Jun 16 21:39:38 2024 GMT + Subject: C = PT, ST = Minho, L = Braga, O = Universidade do Minho, OU = MSGS, CN = ALICE, pseudonym = CLIENT + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + ... + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:FALSE + X509v3 Key Usage: critical + Digital Signature, Non Repudiation + X509v3 Extended Key Usage: + TLS Web Client Authentication + Signature Algorithm: sha256WithRSAEncryption + Signature Value: + ... +``` +Neste certificado, os campos importantes incluem: +- **Serial Number**: Identificador único do certificado. +- **Validity**: Indica o período durante o qual o certificado é válido. +- **Subject**: Informações sobre a entidade a quem o certificado é emitido. +- **Subject Public Key Info**: Detalhes sobre a chave pública, incluindo o algoritmo e o tamanho. +- **X509v3 extensions**: Contém informações adicionais, como restrições básicas, uso de chaves e uso de chaves estendido. +- **Signature Algorithm**: Algoritmo usado para assinar o certificado. +- **Signature Value**: O valor de assinatura real que garante a integridade do certificado. + + +## Q3 + +Para provocar erros do tipo de validação do certificado, podemos alterar o certificado de várias maneiras, como: +- Alterar a data de validade para uma data anterior à data atual. +- Alterar o nome do emissor ou do sujeito. +- Alterar a chave pública ou privada. + +Para provocar erros na validação da assinatura, podemos alterar a assinatura do certificado, o que invalidará a assinatura e resultará em um erro de validação.