The invention discloses an encryption and search method for revocable keyword search public keys in cloud storage and belongs to the technical field of network security. The method includes: setting system public parameters and dividing system time into z time segments, and creating a public-private key pair at a client; when data storage requests occurs, selecting a keyword collection of a data file, selecting optional symmetrical encryption algorithm to encrypt the data file, utilizing the public key and the current time segment to encrypt the keyword collection, and transmitting the encrypted keyword collection to the cloud server; when the next time segment arrives, generating keyword collection cipher again, and updating the cloud server on a server; when a keyword search request occurs, by the client, utilizing the private key and the current time segment to calculate trap door information of the keywords, transmitting the trap door information to the cloud server, and by the cloud server, obtaining the search results and sending back file cipher containing the search keywords to users. The encryption and search method is suitable for cloud storage with high safety requirements, safe, and efficient, and has the capability of revoking server search.