How to authenticate an archive

Background:
I have a updator feature in my program which will downloads updates to a directory specified be the user. Then user can install these updates whenever he/she wants by just opening them. These updates are nothing but a compressed archive file which is associated to be opened by my app.

Problem:
Now, I want when the user install the updates, my program should ensure that they are original updates created by me and are not modified by someone else. How can I ensure that? I have heard about Winrar authenticity verification. but I’m unsure whether it is good or not?

Edit: User have two ways to install the updates.

A) User download the updates from the server. An update file will get saved on user PC. User will open the update file to install it.

B) This is for user who don’t have internet connectivity on his PC User download the update on a cyber cafe, copy it to his own PC and then install them.

Since in option B, user don’t have internet connectivity in his PC, so my program can not check the base value on update server.

A hash can be provided along with the archive, and used to ensure that the entire patch contains what is expected. This is generally known as a checksum, (even if the term isn’t 100% correct) and is commonly seen on some software sites as a means of verifying the result of a download. Typically, something like SHA-1 is used for the actual hash, since MD5 is known to have collisions.

Of course, the hash itself could be provided by someone with malicious intent, so it alone cannot be trusted.

Enter public / private key cryptography. You would keep the private key secret, and use it to sign your patches. The public key would be embedded in your client software, so that it can verify that the patch comes from someone who has the correct private key (presumably only you). You can read a bit more about digital signatures, which is typically built around the RSA algorithm.

Caveat: of course, if the client install was modified (cracked), someone could have installed their own public key in it. This means they could create their own patches and sign and install them. Since you’re not fully in control of the client environment, there isn’t anything you can do to stop this (short of “always-online”, and even then…).

Edit: I’d also add a word of caution against home-brew solutions. It’s all to easy to think something like, “Hey, I’ll just come up with a clever little way to signal that the archive is genuine, like it must have a file whose name is the total file size of everything in the archive!”. In this case, this algorithm would be the “secret”. Unfortunately, it’s going to be in your client code, and it’d take a skilled programmer a few minutes of disassembly and trawling through your code to figure it out. Please use tested algorithms like RSA!

Edit 2: Any commercial, off the shelf solutions are also fine (perhaps even preferred, since there’s less chance of implementing it incorrectly), as long as they work along the lines I’ve outlined above. I’d investigate each solution carefully, and make a decision.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật