How to change hash checksum of a text file without changing the contents in the file












-1












$begingroup$


I have created a text file called test.txt and the content of the file is Hello World

I would like to change the SHA checksum hash without modifying the contents and filename. Is there any way to do that without using any third party tool on the internet.










share|improve this question









$endgroup$








  • 4




    $begingroup$
    What are you trying to do?
    $endgroup$
    – Alice Ryhl
    Feb 4 at 20:49
















-1












$begingroup$


I have created a text file called test.txt and the content of the file is Hello World

I would like to change the SHA checksum hash without modifying the contents and filename. Is there any way to do that without using any third party tool on the internet.










share|improve this question









$endgroup$








  • 4




    $begingroup$
    What are you trying to do?
    $endgroup$
    – Alice Ryhl
    Feb 4 at 20:49














-1












-1








-1





$begingroup$


I have created a text file called test.txt and the content of the file is Hello World

I would like to change the SHA checksum hash without modifying the contents and filename. Is there any way to do that without using any third party tool on the internet.










share|improve this question









$endgroup$




I have created a text file called test.txt and the content of the file is Hello World

I would like to change the SHA checksum hash without modifying the contents and filename. Is there any way to do that without using any third party tool on the internet.







hash sha-256 sha-1






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 4 at 19:20









CryptoFalconCryptoFalcon

21




21








  • 4




    $begingroup$
    What are you trying to do?
    $endgroup$
    – Alice Ryhl
    Feb 4 at 20:49














  • 4




    $begingroup$
    What are you trying to do?
    $endgroup$
    – Alice Ryhl
    Feb 4 at 20:49








4




4




$begingroup$
What are you trying to do?
$endgroup$
– Alice Ryhl
Feb 4 at 20:49




$begingroup$
What are you trying to do?
$endgroup$
– Alice Ryhl
Feb 4 at 20:49










1 Answer
1






active

oldest

votes


















6












$begingroup$

Hash functions are deterministic, same input same output. Without a modification, you cannot change the result.



The hash of a file is used at least for the integrity check. If you were able to change it without modification the integrity check will have problems.



Note: as mentioned by Ella Rose in the comments if a keyed-hash message authentication code HMAC is used then changing the key will result in a different hash-based message authentication code.






share|improve this answer











$endgroup$









  • 3




    $begingroup$
    They might be able to use some kind of keyed hash function, depending on their use case. But that won't be SHA256 anymore either.
    $endgroup$
    – Ella Rose
    Feb 4 at 20:03










  • $begingroup$
    @EllaRose Yes, if it is a keyed function then changing the key will changed the result. Added, thanks.
    $endgroup$
    – kelalaka
    Feb 4 at 20:10












Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "281"
};
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',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcrypto.stackexchange.com%2fquestions%2f67053%2fhow-to-change-hash-checksum-of-a-text-file-without-changing-the-contents-in-the%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









6












$begingroup$

Hash functions are deterministic, same input same output. Without a modification, you cannot change the result.



The hash of a file is used at least for the integrity check. If you were able to change it without modification the integrity check will have problems.



Note: as mentioned by Ella Rose in the comments if a keyed-hash message authentication code HMAC is used then changing the key will result in a different hash-based message authentication code.






share|improve this answer











$endgroup$









  • 3




    $begingroup$
    They might be able to use some kind of keyed hash function, depending on their use case. But that won't be SHA256 anymore either.
    $endgroup$
    – Ella Rose
    Feb 4 at 20:03










  • $begingroup$
    @EllaRose Yes, if it is a keyed function then changing the key will changed the result. Added, thanks.
    $endgroup$
    – kelalaka
    Feb 4 at 20:10
















6












$begingroup$

Hash functions are deterministic, same input same output. Without a modification, you cannot change the result.



The hash of a file is used at least for the integrity check. If you were able to change it without modification the integrity check will have problems.



Note: as mentioned by Ella Rose in the comments if a keyed-hash message authentication code HMAC is used then changing the key will result in a different hash-based message authentication code.






share|improve this answer











$endgroup$









  • 3




    $begingroup$
    They might be able to use some kind of keyed hash function, depending on their use case. But that won't be SHA256 anymore either.
    $endgroup$
    – Ella Rose
    Feb 4 at 20:03










  • $begingroup$
    @EllaRose Yes, if it is a keyed function then changing the key will changed the result. Added, thanks.
    $endgroup$
    – kelalaka
    Feb 4 at 20:10














6












6








6





$begingroup$

Hash functions are deterministic, same input same output. Without a modification, you cannot change the result.



The hash of a file is used at least for the integrity check. If you were able to change it without modification the integrity check will have problems.



Note: as mentioned by Ella Rose in the comments if a keyed-hash message authentication code HMAC is used then changing the key will result in a different hash-based message authentication code.






share|improve this answer











$endgroup$



Hash functions are deterministic, same input same output. Without a modification, you cannot change the result.



The hash of a file is used at least for the integrity check. If you were able to change it without modification the integrity check will have problems.



Note: as mentioned by Ella Rose in the comments if a keyed-hash message authentication code HMAC is used then changing the key will result in a different hash-based message authentication code.







share|improve this answer














share|improve this answer



share|improve this answer








edited Feb 4 at 20:10

























answered Feb 4 at 19:25









kelalakakelalaka

8,67022351




8,67022351








  • 3




    $begingroup$
    They might be able to use some kind of keyed hash function, depending on their use case. But that won't be SHA256 anymore either.
    $endgroup$
    – Ella Rose
    Feb 4 at 20:03










  • $begingroup$
    @EllaRose Yes, if it is a keyed function then changing the key will changed the result. Added, thanks.
    $endgroup$
    – kelalaka
    Feb 4 at 20:10














  • 3




    $begingroup$
    They might be able to use some kind of keyed hash function, depending on their use case. But that won't be SHA256 anymore either.
    $endgroup$
    – Ella Rose
    Feb 4 at 20:03










  • $begingroup$
    @EllaRose Yes, if it is a keyed function then changing the key will changed the result. Added, thanks.
    $endgroup$
    – kelalaka
    Feb 4 at 20:10








3




3




$begingroup$
They might be able to use some kind of keyed hash function, depending on their use case. But that won't be SHA256 anymore either.
$endgroup$
– Ella Rose
Feb 4 at 20:03




$begingroup$
They might be able to use some kind of keyed hash function, depending on their use case. But that won't be SHA256 anymore either.
$endgroup$
– Ella Rose
Feb 4 at 20:03












$begingroup$
@EllaRose Yes, if it is a keyed function then changing the key will changed the result. Added, thanks.
$endgroup$
– kelalaka
Feb 4 at 20:10




$begingroup$
@EllaRose Yes, if it is a keyed function then changing the key will changed the result. Added, thanks.
$endgroup$
– kelalaka
Feb 4 at 20:10


















draft saved

draft discarded




















































Thanks for contributing an answer to Cryptography Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcrypto.stackexchange.com%2fquestions%2f67053%2fhow-to-change-hash-checksum-of-a-text-file-without-changing-the-contents-in-the%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

Список кардиналов, возведённых папой римским Каликстом III

Deduzione

Mysql.sock missing - “Can't connect to local MySQL server through socket”