DSA ensures integrity by generating a unique signature based on the content of the document. If the document is altered in any way after signing, the signature will not match, indicating a breach in integrity.